Texture colour bleeding
Hi,
I am having problems texture mapping.
The meshes are textured but the texture is coloured with the current drawing colour.
Any ideas?
Many thanks
if you dont want your textures colored call
glColor3f(1.0, 1.0, 1.0); right before you bind the texture.
glColor3f(1.0, 1.0, 1.0); right before you bind the texture.
If your texture color is bleeding off onto other things, try Disabling textures just after drawing them, enabling them just before drawing them.
glEnable(GL_TEXTURE_2D);
...
draw textured stuff
glDisable(GL_TEXTURE_2D);
glEnable(GL_TEXTURE_2D);
...
draw textured stuff
glDisable(GL_TEXTURE_2D);
"The meshes are textured but the texture is coloured with the current drawing colour."
------------------------
That''s OpenGL''s default behavior. Texture colours are multiplied by the drawing colour. If you want the texture''s colour to replace the drawing colour, use
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
after binding the texture.
------------------------
That''s OpenGL''s default behavior. Texture colours are multiplied by the drawing colour. If you want the texture''s colour to replace the drawing colour, use
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
after binding the texture.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement