• Advertisement
Sign in to follow this  

Does fbo collide with the GL_TEXTURE_SHADER_NV?

This topic is 4229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have two programs. One is using the GL_TEXTURE_SHADER_NV, the other is using the FBO. Both work fine. However, there is nothing to be rendered when I combine the GL_TEXTURE_SHADER_NV program into the FBO framwork. The program works if I use "glDisable(GL_TEXTURE_SHADER_NV)" between "FBO.begin()" and "FBO.end()". So I was wondering whether the GL_TEXTURE_SHADER_NV collides with the FBO? Does anybody know how to solve it? Please help. Thanks! The followings are parts of my program: //display function ... ... glLoadIdentity(); glPushMatrix(); glTranslatef(0.04,0.04,-0.5); glScalef(2.0,1.5,1.0); glActiveTextureARB(GL_TEXTURE2_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, flotteTex.TexNum[ENV_TEX]); glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, T_Refraction); glActiveTextureARB(GL_TEXTURE0_ARB); glBindTexture(GL_TEXTURE_2D, T_Water); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glEnable(GL_TEXTURE_SHADER_NV); for(x=0;x<9;x++) { glBegin(GL_TRIANGLE_STRIP); for(y=0;y<10;y++) { glMultiTexCoord2fARB(GL_TEXTURE2_ARB, 0.5, 0.5); glMultiTexCoord2fARB(GL_TEXTURE1_ARB,(-W+x*W/1.94)+0.217,(-W+y*W/1.94)+0.217); glMultiTexCoord2fARB(GL_TEXTURE0_ARB, x/10.0, y/10.0); glVertex2f((-W+x*W/5.0),(-W+y*W/5.0)); glMultiTexCoord2fARB(GL_TEXTURE2_ARB, 0.5, 0.5); glMultiTexCoord2fARB(GL_TEXTURE1_ARB,(-W+(x+1)*W/1.94)+0.217,(-W+y*W/1.94)+0.217); glMultiTexCoord2fARB(GL_TEXTURE0_ARB, (x+1)/10.0, y/10.0); glVertex2f((-W+(x+1)*W/5.0),(-W+y*W/5.0)); } glEnd(); } glActiveTextureARB(GL_TEXTURE2_ARB); glDisable(GL_TEXTURE_2D); glActiveTextureARB(GL_TEXTURE1_ARB); glDisable(GL_TEXTURE_2D); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glActiveTextureARB(GL_TEXTURE0_ARB); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glDisable(GL_TEXTURE_SHADER_NV); glPopMatrix(); ...

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement