Ok - WinNT 4.0 sp6, Visual C++. I have created a COpenGLWnd class, derived from CWnd. When my scene redraws (10 fps), it does not clear the previous image. I am using double buffering, and I am calling glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BITS | GL_ACCUM_BUFFER_BIT) with a glClearColor( 0, 0, 0, 0).
Any ideas as to why it is not clearing the previous image?
The correct call is glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
not GL_DEPTH_BITS. Though GL_DEPTH_BITS is defined in the gl.h for glGet functionality and therefore this compiles!
If that’s not helping, make sure
you have the glDrawBuffer set on the correct buffer,
you have the user scissor disabled or set to the correct area, as this is one of the few calls which affect the glClear,
you have the color maks and depth mask set correctly.
Do you need the accumulation buffer?
On most boards this is virtual memory on the host and it takes very long to clear that in comparison to the color buffer. Maybe you get much more than 10 fps.