Advertisement

Simple OpenGL question

Started by February 11, 2000 09:04 AM
2 comments, last by Ralph 25 years ago
I know this question might sound some kinda stupid, but I was unable to handle it: I´ve loaded one texture, and after drawing a surface using this texture I want to draw another surface colored with red only. So I used glColor3f(1.0f 0.0f, 0.0f) and the result was that the second surface was drawn properly but the first one was textured but it was red, too. Thanks in advance ralph
There are no stupid questions, only stupid answers.

The textured surface needs to be rendered without color blend. I don''t know the exact command for turning this off but you can always set the color to glColor3f(1,1,1) between rendering the red surface and the textured.
Advertisement
You''re probably using

glTexEnv[if](GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE)

which mixes the poly color with the texture. Use GL_REPLACE or GL_DECAL instead of GL_MODULATE.

BTW GL_MODULATE is how you do vertex lighting.

-the logistical one-
http://members.bellatlantic.net/~olsongt
-the logistical one-http://members.bellatlantic.net/~olsongt
Thanks a lot

This topic is closed to new replies.

Advertisement