View Full Version : how to clear color of object from window?

01-19-2005, 07:42 AM
i have loaded a picture using createTexture and glBindTexture and on which i need to draw a small rectangle of a specific color which needs to be animated.
the problem is that the whole window is shaded with the color of the rectangle but i am able to see the picture behind.
How can i clear the color from the whole window and let it appear only in the region of the small rectangle?

01-19-2005, 08:56 AM
set your clear color to something like black
using glClearColor();

bind your texture and draw a quad with the desired color: