How to disable the vertex color...

Started by
3 comments, last by stu_pb 20 years, 11 months ago
I''m new to OpenGL so this question is probably pretty dumb. I have a single quad with a texture on it and this seems to work ok. When I add some bitmap fonts for the fps in the upper left corner of the screen I call glColor3f(1.0f,0.0f,0.0f) to draw the text in red. However, now the texture also has a red shade, I think because the vertices of the quad are also using the glColor value. How can I disable the color at these vertices? Hopefully that made some sense! I should probably be working now...
I should probably be working now...
Advertisement
Set the color to white

--------------------------------

"I''m a half time coder, full time Britney Spears addict"
Targhan
--------------------------------"I'm a half time coder, full time Britney Spears addict" Targhan
That was simple enough, Thanks for the help targhan!

I should probably be working now...
I should probably be working now...
Your texture environment is probably set to GL_MODULATE. This texture mode will turn your texture whatever color you call (it multiplies the texture color with the primary color). There are two ways to fix this. 1) Call glColor3f(1,1,1) right before you draw the quad or 2)Change your texture environment mode to GL_REPLACE by calling glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

-------------------
Realm Games Company
-------------------Realm Games Company

I just wanted to say: THANK YOU !!!! I''ve been having this problem the other way round. I was doing some multitexturing, but my (normally green) bitmap font turned white. After 2 weeks I still didn''t know what caused it. It''s fixed now though.

Thanks again,

Edo
Edo

This topic is closed to new replies.

Advertisement