hook VSYNC?

hook VSYNC?

Post by cgrebel » Thu, 24 Jun 2004 23:09:02

Is there a way for me to access the vsync signal through userspace?
(Like through one of the X-Windows APIs)

And failing that, is there a way to do it from a custom kernel
module?, (without having to modify the video driver)

I know I can set the graphics APIs to 'wait-on-vsync', but I need to
know exactly when the video buffer will be sent to the monitor,
relative to the time when I issued the buffer-blt command. I would
like to be able to do the following:

set_wait_on_vsync( true )
while( true ) {
draw_stuff( my_buffer )
back_buffer_swap( my_buffer )

block_until_vsync() <----- how do i do this?

save_timestamp( time() )

Chris G