Re: How do I sync output changes to vertical retrace?

2006-02-22 Thread Mark Vojkovich
On Wed, 22 Feb 2006, Barry Scott wrote: > Mark Vojkovich wrote: > > The only mechanism I know of is OpenGL. Most OpenGL drivers have > > a mechanism to allow buffer swapping at vblank. > > > Using DRM/DRI this works: > > void waitForVSync() > { > if( card_fd < 0 ) > card_fd = open( "/dev/dri/ca

Re: How do I sync output changes to vertical retrace?

2006-02-22 Thread Barry Scott
Mark Vojkovich wrote: The only mechanism I know of is OpenGL. Most OpenGL drivers have a mechanism to allow buffer swapping at vblank. Using DRM/DRI this works: void waitForVSync() { if( card_fd < 0 ) card_fd = open( "/dev/dri/card0", O_RDONLY ); drm_wait_vblank_t wait_vblank; wait_vblan