PDA

View Full Version : Drawing color affected by texture color



yossi
03-14-2001, 02:51 AM
Simple question:
I texture map a red texture and after that draw a blue line (defined with glColor3f) and the line gets the color of the texture (red instead of blue). why?
The texture env mode is GL_REPLACE. I don't define any lighting. No alpha blending. Very simple program with only minimal settings.
Many thanks,
Yossi

DaViper
03-14-2001, 02:56 AM
could you give the code fragment...

yossi
03-14-2001, 03:21 AM
I found that calling glDisable(GL_TEXTURE_2D) before drawing the line solve the problem! Have I missed something elementary while learning OpenGL or is it a bug in the driver?
Many thanks,
Yossi

DaViper
03-14-2001, 03:56 AM
OpenGl is a state machine so you have to disable texturing bfore you daw something without texture