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?
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?
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 ?
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.