View Full Version : Colours going wrong
I've been playing around a bit today, and had a my first go at trying to use textures. Essentially, I am just drawing a big quad with a texture on it as a background. This goes okay until I draw something else (in this case just another quad but not textured, just gradient filled). Once I do that, the next time the program goes through the update loop and re-draws, the background texture seems to be drawing only the red channel of the texture. Any suggestions?
06-14-2002, 10:14 AM
You probably have a GL_MODULATE texture environment and don't specify a color for the textured geometry.
Either specify a color for the first piece geometry (white would be a good start) or change your texture environment to GL_REPLACE. Either should correct your problem.
OpenGL is a state engine. Whatever state you leave at the end of one frame gets carried to the start of the next frame so you need to be careful about how you manage all state.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.