Advertisement

VSync with win32

Started by February 23, 2000 03:52 PM
2 comments, last by Wraith 24 years, 6 months ago
Does anyone know of a way to wait for the vertical retrace using the win32 api other than using flip()? I am using a backbuffer, but it seems that on some cards (like mine) flip() doesn''t vsync. Any ideas? Wraith cdickinson@scu.edu
[email=cdickinson@scu.edu]Wraith[/email]BasketQase Software
Oops, sorry I meant SwapBuffers(), not flip()... flip() is my function that calls SwapBuffers() and clears the OpenGL buffers.

Wraith
cdickinson@scu.edu
[email=cdickinson@scu.edu]Wraith[/email]BasketQase Software
Advertisement
I''m not sure if it is possible, at least not on every card. Most drivers allow the user to turn VSync on or off, so should take this into account in your application.
I do not know if OpenGL supports it, but I think DX has a function that can check which scanline it is currently drawing. You could either check for the last or the first scanline to stop drawing then call your flip() function.

Edited by - nes8bit on 2/23/00 6:02:03 PM

This topic is closed to new replies.

Advertisement