Multitexturing problem

Started by
1 comment, last by norbip 14 years, 4 months ago
Hello, I have enabled multitexturing in my program:

glActiveTextureARB( GL_TEXTURE0);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[1]);

glActiveTextureARB( GL_TEXTURE1 );
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[2]);

After the initializing, I made the drawing part, then disabled both textures:

glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_2D);

glActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_2D);


But, when I'm trying to draw another object (without multitexturing, using the basic openGL texturing functions) it's not textured like it should be. Before using ARB it was working. Using these commands to init, then drawing:

glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture[0]);


I've to use glActiveTextureARB there too, or what could be the problem? Thanks [Edited by - norbip on December 3, 2009 10:26:27 AM]
Advertisement
Form the looks of it you have disabled texture unit 0... did you turn it back on when you used it again?
Quote:Original post by MARS_999
Form the looks of it you have disabled texture unit 0... did you turn it back on when you used it again?


Thanks! I assumed a simple glenable(gl_texture_2d) would it, but it didn't. :]

This topic is closed to new replies.

Advertisement