PDA

View Full Version : How to reset the OpenGL window?



helenyyh23
09-10-2004, 11:07 PM
I have drawn a 3D model in the window,but I don't know how to reset the window to the initial state?Anyone can help me?

kehziah
09-11-2004, 11:28 AM
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

zed
09-11-2004, 01:43 PM
one way would be to stick around the code

glPushAtrribs( GL_ALL_ATTRIB_BITS );
..
..
glPopAttrib();

ie after the pop the state before the push will be restored