On Sun, 2010-04-04 at 09:50 +0200, Roland Peffer wrote: > Is there an elegant way to get the exact screen frequency ( in microseconds > or even more accurate ) within the clutter/cogl toolkit?
no. in part because there is nothing elegant, in part because the vblank synch is part of how Clutter works. if we have the right extension, on GLX we default to getting an asynchronous notification of a buffer swap; lacking that, we check if glXSwapBuffers() will block and use that delay to time our animations and scene redraws. lacking that, we fall back to a hard timer which may or may not be the same rate of the vblank. if you want to tap into the redraw rate you can install a "repaint function" using clutter_threads_add_repaint_func(); the function is guaranteed to be called each time Clutter redraws the Stages. ciao, Emmanuele. -- Emmanuele Bassi, Open Source Software Engineer Intel Open Source Technology Center -- To unsubscribe send a mail to [email protected]
