Hello,
I’m obviously having a problem using a rectangular texture inside my multitexture system…
My multexture system was previously set as follows:
glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,Material->GLDiff);
glActiveTextureARB(GL_TEXTURE2_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,Material->GLDisp);
glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,FBOTexture);
Everything was working perfectly. I decided to transform my power-of-two FBOTexture into a rectangular texture and then… nothing but black renders.
glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,Material->GLDiff);
glActiveTextureARB(GL_TEXTURE2_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,Material->GLDisp);
glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_RECTANGLE_ARB);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB,FBOTexture);
Actually, I’m not sure if my FBO (yes, you guess it, FBOTexture references to a texture drawn by a Frame Buffer Object) still draw something, or if the problem comes from the second pass (being unable to use both power-of-two and rectangular texture in a multitexturing system…). Of course, my FBOTexture was created appropriately with all the GL_TEXTURE_RECTANGLE_ARB required.
Any tips ?
If you have any code working with both FBO, rectangular texture and multitexturing (and why not, float texture datas), feel free to post it !