shawn619
07-25-2012, 01:48 AM
My previous colors are mysteriously being mixed together with my texture. I first use glColor4f to produce a green and red (alpha) colors for some quads. Then i make a quad that holds just my texture. And from this, somehow the green from drawing previous quads has leaked onto the texture ?
I found two option, none of which work:
#1
Use
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
This successfully removes the leaked colors onto the textures, but now the textures fails to work with basic OGL lighting.
http://oi46.tinypic.com/2u7q7w3.jpg
#2
Using no glTexEnvi (Which is what OpenGL FAQ suggested i do in this situation)
This leaks the previous colors onto the texture, but now successfully works with basic OGL lighting.
http://oi48.tinypic.com/44704.jpg
I found two option, none of which work:
#1
Use
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
This successfully removes the leaked colors onto the textures, but now the textures fails to work with basic OGL lighting.
http://oi46.tinypic.com/2u7q7w3.jpg
#2
Using no glTexEnvi (Which is what OpenGL FAQ suggested i do in this situation)
This leaks the previous colors onto the texture, but now successfully works with basic OGL lighting.
http://oi48.tinypic.com/44704.jpg