Advertisement

Mixing textures and shading (color)

Started by May 21, 2001 04:15 PM
1 comment, last by glDino 23 years, 9 months ago
Hi all. This is a stupid question, but it''s been driving me crazy. Im my program, I enable smooth shading and alpha blending like this: glShadeModel(GL_SMOOTH); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); I then draw some shaded text on the screen with a call to glColor4f(). That''s fine... shading is not a problem. But, how do I apply textures after using the shader?? If I make a call to glBindTexture2D() and apply a texture to some geometry, it will appear in the color of my last call to glColor4f(). Is there some way to disable/enable shading so that it doesn''t interfere with textures?? Thank you.
Just use glColor4f(1.0f,1.0f,1.0f,1.0f).

Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/
Advertisement
Alternatively you could call glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

This topic is closed to new replies.

Advertisement