I am running the application with GL_SYNC_TO_VBLANK=1 ( Vertical sync is ON), thus framerate is 60
Hz (given video rate of 60 Hz). What I need to do is to determine the
“actual” rendering time which is needed to render the image including FSAA.
i.e. the time from the first openGL call until the image is completely drawn in
the backbuffer including AA (Anti-Aliasing).
How do I get this time. Just measuring time between my first and my last
openGL call seems to deliver time without AA.
On NVIDIA hardware, if you do a timing after glFinish, you will not get the actual rendering time but a multiple of the video frequency (assuming vsynch is on).
So for instance, if you do:
>>I don’t understand why the second call to glFinish waits for the next vertical retrace and the first call does not.<<
I meant glFinish has nothing to do with vertical retrace. It just waits until OpenGL has finished rasterization.
Your measurements show that the wglSwapBuffers call doesn’t block by itself but will not happen until the next vertical retrace because the glFinish didn’t return until that swap “rasterization” had finished.