Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Whats the difference between glFlush() and glFinish() and why would I want to use these routines?

routines
0
10 Posted

Whats the difference between glFlush() and glFinish() and why would I want to use these routines?

1

The OpenGL spec allows an implementation to store commands and data in buffers, which are awaiting execution. glFlush() causes these buffers to be emptied and executed. Thus, any pending rendering commands will be executed, but glFlush() may return before their execution is complete. glFinish() instructs an implementation to not return until the effects of all commands are executed and updated. A typical use of glFlush() might be to ensure rendering commands are exected when rendering to the front buffer. glFinish() might be particularly useful if an app draws using both OpenGL and the window system’s drawing commands. Such an application would first draw OpenGL, then call glFinish() before proceeding to issue the window system’s drawing commands.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123