PDA

View Full Version : How do you stop texture mapping?



Succinct
11-30-2000, 06:16 AM
after a call to :


glTexImage2D( GL_TEXTURE_2D,0,4,mw,mh,0,GL_RGBA,GL_UNSIGNED_BYTE ,mImage );

, all of my quads and tris aren't drawn. I'm assuming it's because they're being texture mapped, and most of the texture is alpha 0, so it shouldn't.

how do you turn off a texture?

i know that


glDisable( GL_TEXTURE_2D );
glEnable( GL_TEXTURE_2D );
works, but that's a lot of state.

also, i just enable texture_2d when i attach ogl to an hDC, is this wrong practice?

thx in advance

-Succinct

Moz
11-30-2000, 06:33 AM
I don't think that there is another way to turn off texturing than calling glDisable(GL_TEXTURE_2D).

Michael Steinberg
11-30-2000, 07:34 AM
Then, draw all textured quads befor the untextured quads, that are less state changes.

11-30-2000, 07:36 AM
you can try this ??????

when drawing untextured polys

bind texture 0

11-30-2000, 07:38 AM
sorry

more specifically

glBindTexture(GL_TEXTURE_2D, 0);