[SDL] Problem with ms-windows + opengl...

Romi Kuntsman romik12345 at lycos.co.uk
Thu Jun 6 10:04:01 PDT 2002


Florian Schanda wrote:

>Hi all,
>
>I have the following problem that I can't resolve:
>
>My Linux App uses SDL to make a window for OpenGL (as substitute for GLUT I 
>think... Also I need sound in the future...) To set the video mode I use:
>
>(void)SDL_SetVideoMode(vmResX, vmResY, vmBPP, flags);
>with "flags" being SDL_OPENGL and (if fullscreen SDL_FULLSCREEN as well).
>
>This works fine in Linux and in MS-Windows (2000) it works as well. Graphics, 
>textures all renders perfectly. Fullscreen / Windowed mode, no matter.
>
>PROBLEM:
>Ok, now I want to change resolution. In Linux I just call SDL_SetVideoMode 
>again and the OpenGL function glViewport. It works without problems.
>
>In Windows everything goes black!!! Even if I reload all textures, nothing 
>happens! App is still running though...
>And I mean black. totally black. This even happens when a user "changes" to 
>the same resolution again. Fullscreen / Windowed makes no diff.
>
>Why needs ms-windows this extra hand-holding? What am I missing? Do I need to 
>call some extra SDL function? OpenGL? Win32?
>[Note: vmBPP is allways set to the current desktop resolution]
>[Note2: Please be gentle, as I don't program in ms-windows.]
>[Note3: I am known to make silly mistakes :) Maybe I missed something 
>"obvious"]
>
>Thanks in advance,
>
>	Florian
>  
>
My program can't change resolutions during runtime (only because I 
didn't put code to do that...), it just can switch between fullscreen 
and windowed mode. And if I switch to windowed mode, the same happens to 
me too. The screen goes black or gets corrupted (any drawing to it by 
Windows after that is also corrupted).
The only way I can restore it is to fast-switch to another user and back 
(in Windows XP, using PowerToys for XP). Don't know why it happens 
thought...

I have a 3dfx Voodo3 card. A super defective driver for it came with 
Windows, I found a good one, but it still happens.
What do you have?

RK.





More information about the SDL mailing list