Proper Restart Graphics Sequence?

Hey, I’m trying to add in-game resolution switching for my game "Aquaria"
which uses SDL and OpenGL. I managed to get it working for the MacOSX
version by Quitting the Video subsystem, restarting it and then calling
SetVideoMode with different settings. However, on Windows, after changing
going through this sequence the game runs at <1 fps. I’m curious if this
could be an SDL-related or timer problem? Is there a recommended way to
change resolution?

Thanks. :)–
Alec Holowka
Bit Blot
www.bit-blot.com

DId some more investigating, and it seems like the problem might have been
calling:

SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, vsync);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

before SetVideoMode.On Tue, Nov 25, 2008 at 12:12 PM, Alec Holowka <@Alec_Holowka> wrote:

Hey, I’m trying to add in-game resolution switching for my game "Aquaria"
which uses SDL and OpenGL. I managed to get it working for the MacOSX
version by Quitting the Video subsystem, restarting it and then calling
SetVideoMode with different settings. However, on Windows, after changing
going through this sequence the game runs at <1 fps. I’m curious if this
could be an SDL-related or timer problem? Is there a recommended way to
change resolution?

Thanks. :slight_smile:


Alec Holowka
Bit Blot
www.bit-blot.com


Alec Holowka
Bit Blot
www.bit-blot.com

I used to do this as well, and even though it did not give me any problems,
someone pointed out to me that a simple call to SetVideoMode with different
settings works just as well.

Cheers,
Peter> On Tue, Nov 25, 2008 at 12:12 PM, Alec Holowka wrote:

Hey, I’m trying to add in-game resolution switching for my game "Aquaria"
which uses SDL and OpenGL. I managed to get it working for the MacOSX
version by Quitting the Video subsystem, restarting it and then calling
SetVideoMode with different settings. However, on Windows, after changing
going through this sequence the game runs at <1 fps. I’m curious if this
could be an SDL-related or timer problem? Is there a recommended way to
change resolution?