September 30th, 2003, 06:58 PM
fast opengl redrawing
I have an app that creates an opengl dialog box similar to the one found in "How to Create a CHILD OpenGL Window in a Dialog" (which can be found in the opengl section of this website). This app redraws the opengl window by doing a call to InvalidateRect().
However, when i put it together with the main app, (which is also running opengl) my frame rate of the main app drops from 35 fps to 2 fps even though the dialog box opengl window is not doing anything (i just call a glClearBuffer()). i think that the InvalidateRect() is slowing down the frame rate, because if i remove it the code speeds back up.
Is there anyway to force a redraw of the opengl window without having to reduce the frame rate to 2 fps?
September 30th, 2003, 11:26 PM
does anyone know how to do this? it's just that doing
or invalidateRect() seems to slow everything down tremendously!
thanks in advance...
October 1st, 2003, 12:17 AM
You might want to try Invalidate with the redraw paramter set to false. This should speed things up a little.
void Invalidate( BOOL bErase = TRUE );
Specifies whether the background within the update region is to be erased.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!