PDA

View Full Version : what command to clear what I have drawn?



jackhsw
06-09-2004, 03:06 PM
I have a problem,because I want to rotate a object by redrawing the object,but I don't know how to clear the previous object,please tell me,thanks in advance!

-NiCo-
06-09-2004, 03:50 PM
Use:

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BIT | GL_STENCIL_BUFFER_BIT | ...);

Leave out what you don't need.
You can set the values to which the framebuffer needs to be cleared with the commands

glClearColor(.,.,.,.);
glClearDepth(.);
...

Nico