I am trying to learn GL_ARB_fragment_program, however I’ve a hard time finding tutorials or examples.
Do you know some tutorials, or old code example howto use this stuff?
Thank you in advance, Clemens
Especially some examples howto to use:
glGetProgramivARB
ProgramLocalParameter4fARB
ProgramEnvParameter4fARB
Any whats the difference between local and env parameters?
I think that you might find some examples in older ATI or Nvidia SDK.
Any whats the difference between local and env parameters?
The env parameters are shared between all programs of the same type (e.g. fragment) while the local parameters are set for specific program. In C++ the local parameters would be similar to class members while the env parameters would be similar to global variables.
See the “uniform mat4 mvpx : C0;” . I haven’t found a way to make some of my uniforms global (to make them env-params), so I’m using only local-params.
Btw, look for the glProgramLocalParameters4fvEXT() , it lets you upload all uniforms at once.