Any drawing API function called from the CPU will be submitted to the GPU command ring buffer to be executed later by the GPU. This means that OpenGL functions are mostly non-blocking functions. So the CPU and the GPU will be working in parallel.
The most important thing to note is that your application can be CPU or GPU bound. once you call glFinish the CPU should will wait the GPU to complete it's drawing commands, if the GPU is taking more time and may/is causing the CPU to stall then your applications is GPU bound. If the GPU finishes it drawing commands and the CPU is taking too long to glFinish then your application is CPU bound.
And note that there is a difference between glFlush
and glFinish
glFlush
:indicates that all commands that have previously been sent to the GL must complete in finite time.
glFinish
: forces all previous GL commands to complete. Finish does not return until all effects from previously issued commands on GL client and server state and the framebuffer are fully realized."
glXSwapBuffers
iss used in case of double buffering and will call glFinish and swap the buffers.Citation Needed
The actual frame time will most likely be determined by which of the two CPU/GPU is taking more time to complete its work.