PDA

View Full Version : texture change color of everything



michael roebbeling
03-29-2005, 06:51 AM
i am loading a tga-file as a texture. when i load the file, everything changes its color, like the light is blue, or so.

even when i am not texturing anything.

any hints, what the problem is?

ZbuffeR
03-29-2005, 07:19 AM
Maybe you forgot to glDisable(GL_TEXTURE2D); ?

As geometry does not have texcoords, everything gets the color of a single texel of last texture.

Or the texture loader fiddles with glColor/glMaterial ?

dvm
03-29-2005, 08:41 AM
Also, don't forget to use
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
if you want your texture to completely replace the color of the polygon.