PDA

View Full Version : Vertical Sync disabling problems



dummstah
04-01-2003, 12:24 PM
I've been using the following code:
// Turn off vertical screen sync under Windows.
// (I.e. it uses the WGL_EXT_swap_control extension)
typedef BOOL (WINAPI *PFNWGLSWAPINTERVALEXTPROC)(int interval);
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
if (wglSwapIntervalEXT != NULL)
wglSwapIntervalEXT(0);

to disable verticle sync, if the extension is supported. Yesterday I upgraded to the new Detonator drivers (43.45) for my GF4. However, now this code above doesn't seem to work, and the only way I can get vertical sync turned off is to totally disable it in the control panel (even setting it to Off by default doesn't work). And even when I turn it Off totally when I change my application to fullscreen it turns it back on again, even though I have it turned totally off.

This wouldn't normally cause a problem, but for some reason when vertical sync is enabled my game engine physics, controls and animation runs slightly slower.

Has anyone had a problem with vertical sync not turning off by code with the new detonator drivers?

Miguel_dup1
04-01-2003, 12:54 PM
New detonator??? Hurray.

You will definatelly get a reply on this as soon as people get their det. installed. http://www.opengl.org/discussion_boards/ubb/smile.gif

I will get back with you myself in a few.

dummstah
04-02-2003, 12:54 PM
Any luck so far? I've been trying to find a fix but have had no luck so far.

dummstah
04-03-2003, 07:48 AM
Something I just noticed. The reason I need vertical sync turned off is because when its on my physics/control updates slow down from 35fps to 20fps, and the game runs slower.

However, if I comment out "SwapBuffers(openGL.glhDC);" it doesn't slow down at all. Is this a performance problem in openGL's SwapBuffers function?

oliii
04-03-2003, 05:32 PM
if it's windowed, could be.

I would try to do the update/controls with a separate timer anyway.

dummstah
04-04-2003, 04:54 AM
This is full screen and windowed. When I try putting the code in a seperate thread the engine just mass errors when trying to change from/to fullscreen.