Textures and Color4f..?

Started by
2 comments, last by OrangyTang 18 years ago
Im looking at Nehe tutorial 19, and the author binds a texture to a quad, and then changes the textures color with a call to Color4f. I tried this in one of my applications and it doesnt effect the color of the texure...any ideas?

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Advertisement
Use glTexEnv to set the environment mode to "modulate". That multiplies the texture color by the vertex color, instead of replacing the color entirely with the texture color.
I'm sure that will work, but he doesnt have that in his code. :(

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Have you perchance got lighting enabled in your own app? When lighting is enabled surface colours come from the object's material settings, vertex colours are ignored. You can make the material colours track the vertex colours with GL_COLOR_MATERIAL.

This topic is closed to new replies.

Advertisement