View Full Version : Antialiasing and glfinish

12-18-2002, 04:52 AM
Is it true that whenever glFinish() is called, it won't return until the pipeline is empty and the framebuffer has been antialiased? Does glFlush() perform the same as glFinish() except it doesn't do antialiasing? Also, when I issue a swapBuffers command, it that supposed to wait for the vertical retrace, or do I need to call a glFinish() after the call to swapBuffers to wait for the vertical retrace? Any advice will be greatly appreciated.

12-19-2002, 01:13 AM
- glFlush triggers rendering of buffered data and immediately returns. Rendering commands may still be processed when the function returned.
- glFinish does a glFlush and returns when all rendering commands have been processed. You must use if you mix OpenGL with GDI calls.
- Wait for vertical retrace is an option in most vendors control panels with options like off/app controlled/on. Applications can control the behaviour with the swap_interval extension. glFinish has nothing to do with monitor syncs.
- There's no need to call glFlush or glFinish before or after SwapBuffers. SwapBuffer implicitly needs to take care that all drawing has finished on the back buffer before it can swap.
- You need to call glFlush or glFinish at the end in case of single buffered rendering.
- You need glFinish to synchronize multithreaded drawing.