Fullscreen Vsync in Win32

I am using SDL1.2.11, WinXp, Ati X800 PCI Express videocard

I have tried setting the flags as follows:
flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN;
SDL_SetVideoMode(640, 480, 32, flags);

When rendering the screen, I call *SDL_Flip( ).

*However, vsync does not appear to be taking place as the frame rate
exceeds 60hz or
whatever I set the monitor refresh rate to.

Please advise!

Im not sure why vsync is off for you but if you’re in windows you can use
this function to turn on and off vsync:

#include <windows.h>

void VSyncOn(char On)
{
typedef void (APIENTRY * WGLSWAPINTERVALEXT) (int);

WGLSWAPINTERVALEXT wglSwapIntervalEXT = (WGLSWAPINTERVALEXT)
wglGetProcAddress(“wglSwapIntervalEXT”);
if (wglSwapIntervalEXT)
{
wglSwapIntervalEXT(On); // set vertical synchronisation
}
}> ----- Original Message -----

From: sdl-bounces+atrix2=cox.net@libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of Adam Smith
Sent: Wednesday, July 05, 2006 7:26 PM
To: sdl at libsdl.org
Subject: [SDL] Fullscreen Vsync in Win32

I am using SDL1.2.11, WinXp, Ati X800 PCI Express videocard

I have tried setting the flags as follows:
*flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN;
SDL_SetVideoMode(640, 480, 32, flags);
*
When rendering the screen, I call *SDL_Flip( ).

*However, vsync does not appear to be taking place as the frame rate
exceeds 60hz or
whatever I set the monitor refresh rate to.

Please advise!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

That technique works only when the SDL_OPENGL flag is set. You may have
to try forcing V-sync in the video card drivers, however that has never
worked outside of OpenGL in my experience [on a Geforce]. You can try
to use SDL_Delay to slow down the framerate.

Alan Wolfe wrote:> Im not sure why vsync is off for you but if you’re in windows you can use

this function to turn on and off vsync:

#include <windows.h>

void VSyncOn(char On)
{
typedef void (APIENTRY * WGLSWAPINTERVALEXT) (int);

WGLSWAPINTERVALEXT wglSwapIntervalEXT = (WGLSWAPINTERVALEXT)
wglGetProcAddress(“wglSwapIntervalEXT”);
if (wglSwapIntervalEXT)
{
wglSwapIntervalEXT(On); // set vertical synchronisation
}
}

-----Original Message-----
From: sdl-bounces+atrix2=cox.net at libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of Adam Smith
Sent: Wednesday, July 05, 2006 7:26 PM
To: sdl at libsdl.org
Subject: [SDL] Fullscreen Vsync in Win32

I am using SDL1.2.11, WinXp, Ati X800 PCI Express videocard

I have tried setting the flags as follows:
*flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN;
SDL_SetVideoMode(640, 480, 32, flags);
*
When rendering the screen, I call *SDL_Flip( ).

*However, vsync does not appear to be taking place as the frame rate
exceeds 60hz or
whatever I set the monitor refresh rate to.

Please advise!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Adam Smith wrote:

I am using SDL1.2.11, WinXp, Ati X800 PCI Express videocard

I have tried setting the flags as follows:
*flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN;
SDL_SetVideoMode(640, 480, 32, flags);
*
When rendering the screen, I call *SDL_Flip( ).

*However, vsync does not appear to be taking place as the frame rate
exceeds 60hz or
whatever I set the monitor refresh rate to.

Please advise!

The ATI driver is probably set to force VSync off. It is usually on by
default however gamers think higher = better so they deliberately come
with VSync off.

Pete.

Thanks Damien, I didn’t know it only worked with the GL flag set> ----- Original Message -----

From: sdl-bounces+atrix2=cox.net@libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of Damien A
Sent: Tuesday, July 25, 2006 6:48 PM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] Fullscreen Vsync in Win32

That technique works only when the SDL_OPENGL flag is set. You may have
to try forcing V-sync in the video card drivers, however that has never
worked outside of OpenGL in my experience [on a Geforce]. You can try
to use SDL_Delay to slow down the framerate.

Alan Wolfe wrote:

Im not sure why vsync is off for you but if you’re in windows you can use
this function to turn on and off vsync:

#include <windows.h>

void VSyncOn(char On)
{
typedef void (APIENTRY * WGLSWAPINTERVALEXT) (int);

WGLSWAPINTERVALEXT wglSwapIntervalEXT = (WGLSWAPINTERVALEXT)
wglGetProcAddress(“wglSwapIntervalEXT”);
if (wglSwapIntervalEXT)
{
wglSwapIntervalEXT(On); // set vertical synchronisation
}
}

-----Original Message-----
From: sdl-bounces+atrix2=cox.net at libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of Adam Smith
Sent: Wednesday, July 05, 2006 7:26 PM
To: sdl at libsdl.org
Subject: [SDL] Fullscreen Vsync in Win32

I am using SDL1.2.11, WinXp, Ati X800 PCI Express videocard

I have tried setting the flags as follows:
*flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN;
SDL_SetVideoMode(640, 480, 32, flags);
*
When rendering the screen, I call *SDL_Flip( ).

*However, vsync does not appear to be taking place as the frame rate
exceeds 60hz or
whatever I set the monitor refresh rate to.

Please advise!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl