using textures and solid colours

Started by
5 comments, last by juanpaco 17 years, 4 months ago
Hey... I'm wanting to use both textures and solid colours in my program...however when i do this the textured objects seemed to be coloured (although you can still see the texture through them). I'm wondering if this is a common problem and is there anything i can do I'm grateful for any help, thanks
Advertisement
Try changing the vertices of the polygon on which you're going to stick your texture. From what I remember, the texture will be tinted according to the polygon it's drawn on. So use white so it doesn't change.
wow awsome that worked perfectly...

thanks!
That's right, it's not a bug but normal behaviour. For textured objects, using a white color fixes your problem, for colored objects, just disable texture mode when drawing these. Though my OpenGL knowledge is a bit rusty, so it may not be that straightforward, but I don't think it'll be too hard either.
Create-ivity - a game development blog Mouseover for more information.
In fact this is GL_MODULATE behaviour, which is the default. You can either set the current colour to white, or use GL_REPLACE instead (see glTexEnv).
ah kool cheers guys, now i understand
Quote:Original post by ov3r_dr1v3
wow awsome that worked perfectly...

thanks!


NP. That same problem had me po'd for the longest time a while ago... could not for the life of me figure out why the dang mona lisa texture was green... I don't remember Leonardo painting it that way... probably because he never used OpenGL.

This topic is closed to new replies.

Advertisement