Frame Time

Dear All,

How to calculate the time taken by a given Frame to complete?


You can’t, some stuff is put on hold and will not execute until glFlush is called, but even after that, your application can continue to run while the GPU continue with the hard work.

There is at least no portable way to do it that I am aware of.

You can of course measue the time the CPU is spending on a frame, but I guess that is not what you are interested in.


disable vsync, and measure your before/after times after the swapbuffers. Unless the driver is triple buffering, you can be sure this is the time it took to render the frame.