PDA

View Full Version : Multi shadres app



juglarx
07-07-2007, 04:14 PM
Hi folks i have problem try to bind 2 object one with shaders and other without heres is a pseudocode

SetUniform4f(.......);
glUseProgramObjectARB(glslContext);

draw1ObjectWithShaders();

glUseProgramObjectARB(0);

glPushMatrix();
draw1ObjectWithoutShaders();
plPopMatrix();


what's wrong with that? thxs in advance!!!

Komat
07-07-2007, 05:35 PM
Functions for setting value of uniform operate on currently bound program object. If no object is set at time of that call, function will report error and do nothing.

km,
07-10-2007, 11:44 AM
Which means as Komar suggested, if you want to use SetUniform4f...

then switch calls

glUseProgramObjectARB(glslContext);
SetUniform4f(.......); // set for glslContext object