but, on ATi glSlang the lighting state isn't recovered, so the right cube is only red without lighting (even when calling glUseProgramObject(0)).
also a problem is the recovery from before used program objects with bound uniforms. on nvidia drivers (61.12) it works fine to push a program object and use another with other uniforms on the same slots. when you pop the program object the old is bound with the previous uniforms. on ATi the uniforms aren't reloaded. well i could find a way to live with that, but is this a bug or will this be solved in future releases.

please no flames about driver quality. i want to know what the right behavior should be. thx.

Relic

05-18-2004, 08:32 AM

I thought I answered that before.
See ARB_shader_object specs chapter 2.17 Required State
The values are not part of the state, so cannot be pushed.
Sounds like an implementation dependency. The right thing would be to reload the values.

BTW, the glPushAttrib takes a bitfield, that's why the enums have the _BIT suffix ;) use a single call and OR all bits together.

Chris Lux

05-18-2004, 10:21 PM

Originally posted by Relic:
I thought I answered that before.
BTW, the glPushAttrib takes a bitfield, that's why the enums have the _BIT suffix ;) use a single call and OR all bits together.thanks for answering, i know about the _BIT stuff, but when doing very much changes to the code because of debugging i it like this way ;) .

the main problem was, that the lighting state is _not_ recovered on ATi drivers.

the other issue for me is. _should_ the bound uniforms be enabled to react to glPush/PopAttrib? on nVidia drivers they do, maybe some more people should give their opinion obout this issue, so it can be added to the discussion of, maybe, extending the shader objects spec in the future.