how to clear color of object from window?

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?

um…
set your clear color to something like black
using glClearColor();

bind your texture and draw a quad with the desired color:
glColor4f(r,g,b,a);