Archived

This topic is now archived and is closed to further replies.

Texture colour bleeding

This topic is 5039 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites
"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.

Share this post


Link to post
Share on other sites