Jump to content
  • Advertisement
Sign in to follow this  
Chaotis

Multitexturing-something I'm overlooking or texture loader bugged?

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

A problem I've been having for a short time, for some reason any texture I pass to the first unit will also be passed to the second. Does anyone see something I'm missing or does it seem to be something wrong with the texture loader itself. (I did not write it) If the latter is there any common mistake that might have been made to cause this I could look for? <code> glBindTexture(GL_TEXTURE_2D, Texture[0]); tgaLoad("maptex.tga", &the_image, TGA_FREE | TGA_COMPRESS); tgaSetTexParams(GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_MODULATE); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Texture[1]); tgaLoad("detail.tga", &the_image, TGA_FREE | TGA_COMPRESS); tgaSetTexParams(GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_MODULATE); glEnable(GL_TEXTURE_2D); glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Texture[0]); glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2); glBindTexture(GL_TEXTURE_2D,Texture[1]); </code>

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!