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 ?
This successfully removes the leaked colors onto the textures, but now the textures fails to work with basic OGL lighting.
#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.
If you had to use glColor instead of glMaterial, then you had enable material color tracking.
Yes, when your glTexEnv mode is MODULATE, then the final color is glColortexturelighting.
I’v been using glColor always and instead of glMaterial, i dont know if thats a bad thing, but i haven’t had any problems.
Normally i dont set any texture environment. Is MODULATE the same having the texture environment at default?
I’m not saying that enabling color tracking is bad. I’m just saying that you had not indicated in your post so I said use glMaterial.
Yes, the default is MODULATE.
Overall, all this is ancient history and eventually, you should move to GL 3.3 or 4.0.