Sign in to follow this  
MadsGustaf

Reseting the color?

Recommended Posts

MadsGustaf    144
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
CodeMunkie    805
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

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