PDA

View Full Version : switch GL/GLSL mode



xfigpower
08-02-2005, 03:36 AM
Hi,

I want to compare the performances beetween classic Opengl and Shading Language. The idea is to insert a button in order to chose the implementation.

But, once shaders were activated, I can't inactivate them, even if I destroy the programm. How can I switch easily beetxeen these two functionning?

If someone can answer me or point toward a topic

Thanks

sqrt[-1]
08-02-2005, 05:06 AM
Bind program 0 (zero) and you will return to fixed function.

xfigpower
08-02-2005, 05:32 AM
Thanks! It was so simple :)

if(shader_activate){
glUseProgram(PhongProg);
}else{
glUseProgram(0);
}