Sign in to follow this  

Reseting the color?

This topic is 3570 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

After having drawn some textures, im trying to draw some basic vector graphic, but it seems the color gets all messed up when i use:
glColor3f()
it seems to get affected by some colors from the previous textures. Is there anyway to "reset" the color, so glColor3f(200,0,0); actually shows red :P

Share this post


Link to post
Share on other sites
OpenGL is a state machine. When you set a certain state (2d texture for example), that state does not change until you explicitly change it. So if you draw some textured objects, and then you want to draw an untextured object, then you need to call glDisable(GL_TEXTURE2D) to turn off texturing, or the last bound texture will be applied to the object.

Share this post


Link to post
Share on other sites

This topic is 3570 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.

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