Jump to content
  • Advertisement
Sign in to follow this  
norbip

OpenGL Multitexturing problem

This topic is 3176 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

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]

Share this post


Link to post
Share on other sites
Advertisement
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. :]

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!