3

OpenGL Wiki tells something interesting regarding GPU/CPU synchronization in the last paragraph of the Swap Interval topic page:

If GPU<->CPU synchronization is desired, you should use a high-precision/multimedia timer rather than glFinish after a buffer swap.

glFinish() or glFenceSync() based approaches aren't working well, as suggested by the quoted text. I believe that those high-precision / multimedia timers are not part of the OpenGL Specification. So:

Does anyone know how to use high-precision/multimedia timers in order to call some CPU code (perhaps grab a timestamp) immediately after the buffer swap on a V-Synched display?

I target a solution written in C++ and compiled on Linux, but any library name, code bits or intuition would greatly help!

Joel
  • 4,732
  • 9
  • 39
  • 54
Jonathan
  • 331
  • 2
  • 6
  • Why do you need to implement synchronization as such? The discussion of synchronization in the Swap Interval wiki page is primarily intended as a means of minimizing input latency. It would help if you explained what you were trying to do, simply telling us that something is not working well is not a lot to go on. – Andon M. Coleman Feb 01 '14 at 20:06
  • This question is related to this [one] (http://stackoverflow.com/questions/19772758/how-do-you-know-what-youve-displayed-is-completely-drawn-on-screen) – Jonathan Feb 02 '14 at 20:35

0 Answers0