View Full Version : no need for glflush!?

cem polat
10-20-2004, 12:50 PM
In OpenGL Reference Manual it is only written for glFlush that "glFlush - force execution of GL commands in finite time". However it is not a clear description since it may confuse minds as if commands can be also executed without glFlush.
In some references it is written that glFlush() might not be needed if the OpenGL program is not executed over a network (also not for a 3D card that buffers commands) since commands are executed as they are issued.
When I try to draw something without glFlush by glut, nothing is drawn even I wait for a while.
Since no primitives were drawn without glFlush, it seems that the main purpose for calling glFlush is to start the drawing process rather than forcing issued commands to execute. Even there is only a single command issued, it is still pending for execute until glFlush is called. I wonder if it is really possible to draw a drawable(primitive,texture...) without using glFlush. If it is not, then why doesn't anybody clearly tell in any reference doc. that objects cannot be drawn without glFlush?

10-20-2004, 02:04 PM
(not so advanced)
simple, most people do double buffering, and a call to SwapBuffers (or equivalent) will flush anyway.
Read the FAQ :
And see :