Reseting the color?

Started by
1 comment, last by MadsGustaf 16 years, 1 month ago
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
•°*”˜˜”*°•.˜”*°•..•°*”˜.•°*”˜˜”*°•..•°*”˜˜”*°•.˜”*°•.˜”*°•. Mads .•°*”˜.•°*”˜.•°*”˜˜”*°•.˜”*°•..•°*”˜.•°*”˜.•°*”˜ ˜”*°•.˜”*°•.˜”*°•..•°*”˜I am going to live forever... or die trying!
Advertisement
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.
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
Thanks mate :).
•°*”˜˜”*°•.˜”*°•..•°*”˜.•°*”˜˜”*°•..•°*”˜˜”*°•.˜”*°•.˜”*°•. Mads .•°*”˜.•°*”˜.•°*”˜˜”*°•.˜”*°•..•°*”˜.•°*”˜.•°*”˜ ˜”*°•.˜”*°•.˜”*°•..•°*”˜I am going to live forever... or die trying!

This topic is closed to new replies.

Advertisement