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

Florian Schanda ma1flfs at bath.ac.uk
Thu Jun 6 07:50:01 PDT 2002


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




More information about the SDL mailing list