Sign in to follow this  
ov3r_dr1v3

using textures and solid colours

Recommended Posts

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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this