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?
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
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