OpenGL trouble in Windows

Anyone around who has been using SDL_OPENGL|SDL_FULLSCREEN
and SDL_OPENGL|SDL_RESIZABLE? And toggling between the two?

SDL_WM_ToggleFullScreen() unfortunately does
not work in Windows, but it seems easy to use
SDL_SetVideoMode() instead. AFAIK, this code should
do the trick. Anything else that should be done?

if(!SDL_WM_ToggleFullScreen(surface))
{
if(SCREENFLAGS & SDL_FULLSCREEN) {
SCREENFLAGS = SDL_OPENGL | SDL_RESIZABLE;
}
else {
SCREENFLAGS = SDL_OPENGL | SDL_FULLSCREEN;
}
surface = SDL_SetVideoMode(SCREENWIDTH, SCREENHEIGHT,
SCREENBPP, SCREENFLAGS);

initGLStuff(SCREENWIDTH, SCREENHEIGHT);
}

And window resize:

if(event.type == SDL_VIDEORESIZE)
{
surface = SDL_SetVideoMode(event.resize.w,
event.resize.h, SCREENBPP, SCREENFLAGS);

initGLStuff(event.resize.w, event.resize.h);
}

The problem is that while this works fine on my computer,
for example a Win98/Voodoo3 2000 one doesn’t like it at
all. Resizing the window segfaults randomly. Switching
from windowed to fullscreen works, but switching back
gives a black window and segfaults when mouse is moved.

Any ideas or experiences? Might be a driver problem, but
then, some non-SDL OpenGL programs can do the same just fine.

gtxayf1q001 at sneakemail.com wrote:

The problem is that while this works fine on my computer,
for example a Win98/Voodoo3 2000 one doesn’t like it at
all. Resizing the window segfaults randomly. Switching
from windowed to fullscreen works, but switching back
gives a black window and segfaults when mouse is moved.

Any ideas or experiences? Might be a driver problem, but
then, some non-SDL OpenGL programs can do the same just fine.

The problem is with the Voodoo drivers.
I had a Voodoo card until very recently, and I also got this exact
problem (and other hehe…).
I have no idea why does this happen with SDL, and trust me - I did
everything I could to find out (i.e. playing with modified SDL code…)

RK.

so if you need to toggle between window/full screen and different
resolutions in GL, you can do it by just resetting the video mode and
re-init’ing gl?> ----- Original Message -----

From: romik12345@lycos.co.uk (Romi Kuntsman)
To:
Sent: Sunday, September 08, 2002 12:41 PM
Subject: Re: [SDL] OpenGL trouble in Windows

gtxayf1q001 at sneakemail.com wrote:

The problem is that while this works fine on my computer,
for example a Win98/Voodoo3 2000 one doesn’t like it at
all. Resizing the window segfaults randomly. Switching
from windowed to fullscreen works, but switching back
gives a black window and segfaults when mouse is moved.

Any ideas or experiences? Might be a driver problem, but
then, some non-SDL OpenGL programs can do the same just fine.

The problem is with the Voodoo drivers.
I had a Voodoo card until very recently, and I also got this exact
problem (and other hehe…).
I have no idea why does this happen with SDL, and trust me - I did
everything I could to find out (i.e. playing with modified SDL code…)

RK.


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