PDA

View Full Version : Turn off Multitexturing and use 1 texture



soconne
08-22-2003, 02:57 PM
If you use
glActiveTextureARB(GL_TEXTURE0_ARB)
glBindTexture(GL_TEXTURE_2D, texture1)

and

glActiveTextureARB(GL_TEXTURE1_ARB)
glBindTexture(GL_TEXTURE_2D, texture2)

How can you then draw a model with only 1 texture. I'm drawing a terrain and using multitexturing but then I want to draw a model with 1 texture, but for some reason i can't get OpenGL to turn off multitexture mode. For instance I reset

glActiveTextureARB(GL_TEXTURE0_ARB)
glBindTexture(GL_TEXTURE_2D, modeltexture)

but opengl still uses the second texture to blend in with the new one. How can I turn this off?

JD
08-22-2003, 03:03 PM
glDisable(gl_tex1_arb) or something like that. You're then disabling the 2nd texture unit while letting 1st be still active. You can also revert back to the old gl texturing modes if your gfx algo allows it. They will use the 1st texture unit only.

jra101
08-22-2003, 04:22 PM
glActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_2D);
glActiveTextureARB(GL_TEXTURE0_ARB);