PDA

View Full Version : 66.31 bug or expected behaviour? glProgramEnvParameter and contexts



CatAtWork
09-27-2004, 11:14 AM
Should glProgramEnvParameterARB update environment variables if called from a non-main (wrt ARB_*_program creation) context?

On the latest NVidia drivers I could find, it does not. My contexts are shared via wglShareLists.

I was doing:

make pbuffer context current
glProgramEnvParameter
glProgramEnvParameter
glProgramEnvParameter
make main context current
use rendered texture with fragment program

but had to move the envParam updates above the pbuffer context switch.

EDIT:
It also seems that the texture bound to image unit 3 is being ignored in the pbuffer context.

prefect
09-28-2004, 03:17 AM
My understanding of the spec is that ProgramEnvParameter() sets per-context state, while ProgramLocalParameter() sets per-program state.

So I would expect program.env to be different between contexts (even shared ones), while I would expect program.local to be the same if you use the same program in different (sharing) contexts. However, I haven't tested that.

cu,
Prefect

CatAtWork
09-28-2004, 07:02 AM
program environment parameter - A set of 96+ 4-component vectors
belonging to the GL context that can be used as constants during the
execution of any vertex program.

Thanks for confirming that. It seems odd that you can share objects, but not environment parameters.