On 13/06/06, Raphael fenix@club-internet.fr wrote:
I only have one question: i see you have a cache to reuse prgid in set_glsl_shader_program but what happens if user/app change the shaders content (for example using SetFunction) ? your pre-compiled program will be correct ? (because i don't see any list cleanup in shaders function reset)
Good point :-) I wonder if respecifying the source and recompiling the program is worth it, or if we should just create a new shader object.
- It is correct to have GLSL binding code out of "if
(useVertexShaderFunction)" block ?
It is, actually. If there's no shader in use, we need to tell GL to use fixed function again. The glUseProgramObjectARB call takes care of that. (programId is zero when no shaders are in use).