PDA

View Full Version : disabling fragment shader within multipass



udarnik
06-12-2005, 01:01 AM
I have a glut-based application whose display method looks like this:


my_glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB,myProg ram);
glEnable(GL_FRAGMENT_PROGRAM_ARB);

// draw stuff using fragment program
// ...

my_glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB,0);
glDisable(GL_FRAGMENT_PROGRAM_ARB);

// draw stuff not using fragment program
// ...but everything is drawn via the fragment program - can I disable it between individual passes of a multipass render, and if so how?

sqrt[-1]
06-12-2005, 01:13 AM
Yes you can disable fragment programs between passes.
Yes your code looks like it should work.
We need more information if you want more help. (preferably a example program to download)

M/\dm/\n
06-12-2005, 03:04 AM
Just remember to use fstransform() or alternative if you mix shaders and ffp.

udarnik
06-12-2005, 05:55 AM
Thanks both - the salutary exercise of compiling a minimal test case has shown me that my initial analysis was quite wrong and it's actually a texturing problem!