yooyo
03-08-2004, 03:19 PM
It will be nice to add support for better vsync
control. For example add some function like glGetTimeToSwap(GL_MILISECONDS) or add some wgl/glx functions that can use OS specific syncing objects like events.
Right now, SwapBuffers take too much CPU time.
Example:
HANDLE hswap = wglGetSwapEvent();
while (!bQuit)
{
Render();
WaitForSingleObject(hswap, INFINITE);
SwapBuffers();
}
This code is usefull only when you enable vsync.
control. For example add some function like glGetTimeToSwap(GL_MILISECONDS) or add some wgl/glx functions that can use OS specific syncing objects like events.
Right now, SwapBuffers take too much CPU time.
Example:
HANDLE hswap = wglGetSwapEvent();
while (!bQuit)
{
Render();
WaitForSingleObject(hswap, INFINITE);
SwapBuffers();
}
This code is usefull only when you enable vsync.