Hi,
I have a program where I draw various things onto the screen. One of them is a fps counter. Normally, when vsync is turned on, the framerate is about 59fps. When I turn it off, it jumps to the 100-200fps range. I have set it to its default setting ("Let the 3D application decide") and I now need to know HOW TO let OpenGL decide. Is there a function I need to call?
G
Quote:Original post by GeometrianIt's an extension function called wglSwapInterval.
Hi,
I have a program where I draw various things onto the screen. One of them is a fps counter. Normally, when vsync is turned on, the framerate is about 59fps. When I turn it off, it jumps to the 100-200fps range. I have set it to its default setting ("Let the 3D application decide") and I now need to know HOW TO let OpenGL decide. Is there a function I need to call?
G
Yes but...
I somewhat of a new programmer and I need a specific way to do this...
I would appreciate any help anyone could give me on how exactly to do this...
G
P.S. Thanks for the response
I somewhat of a new programmer and I need a specific way to do this...
I would appreciate any help anyone could give me on how exactly to do this...
G
P.S. Thanks for the response
This is how I do it.
Then call SetVSync( true or false ); in the Initialise process.
Good luck, Cheers!
/*================================================================================SetVSync() : VSync on / off================================================================================*/void SetVSync(bool pSync){ typedef bool (APIENTRY *PFNWGLSWAPINTERVALFARPROC)(int); PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0; wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress("wglSwapIntervalEXT"); if( wglSwapIntervalEXT ) wglSwapIntervalEXT(pSync);}
Then call SetVSync( true or false ); in the Initialise process.
Good luck, Cheers!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement