View Full Version : how to clear screen after drawing?
i tried clearing screen to black using
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); and
glClearColor(0.0f, 0.0f, 0.0f, 1.0f );
but my scene still remains
Maybe you should try in that order :
glClearColor(0.0f, 0.0f, 0.0f, 1.0f );
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Steve.
Leyder Dylan
12-12-2003, 12:17 AM
Hi,
I tryed that and that works :
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clean the screen and the depth buffer
glLoadIdentity(); // Reset The Projection Matrix
I want to clear that screen on clicking a dialog button so i tried all the above in my button function but still nt working.
cwc36
12-13-2003, 09:40 PM
Hi,
have you put the glutSwapBuffer() at the bottom of the display function()?
cwc36
12-13-2003, 09:43 PM
Hi,
Try to do it as below:
OnTimer()
{
SendMessage(WM_PAINT);
}
Hopi it can help.
thank you! i did nt swapbuffers in my function
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.