Window resizing/fullscreen switch on win32 OpenGL

Hi,

I’m having some trouble with opengl on win32.

If I use the RESIZE flag and SetVideoMode on a resize the screen goes
blank.

Also WM_toggle_fullscreen doesn’t seem to have any effect.

Does anyone have any experience with this?

(Opengl 1.2 Win98 SDL 1.2)

Cheers

Lee–
sdl

Also WM_toggle_fullscreen doesn’t seem to have any effect.

It only works under Linux’s x11 video driver…we just discussed this a
few days ago. :slight_smile:

Basically, use SDL_SetVideoMode() to toggle. Your surface pointers
will change, unlike SDL_WM_ToggleFullScreen(), and you might have to reset
some surface state, but SDL can’t, under DirectX, give you the same pixels
pointer, etc.

(Actually, you should probably call SDL_WM_ToggleFullScreen(), and if that
fails, do it The Hard Way. Email me directly for some work-in-progress
code that does this very thing.)

–ryan.

“Ryan C. Gordon” writes:

Also WM_toggle_fullscreen doesn’t seem to have any effect.

It only works under Linux’s x11 video driver…we just discussed this a
few days ago. :slight_smile:

Opps, only just joined! I did check the archives but probably before
the discussion.

Basically, use SDL_SetVideoMode() to toggle. Your surface pointers
will change, unlike SDL_WM_ToggleFullScreen(), and you might have to reset
some surface state, but SDL can’t, under DirectX, give you the same pixels
pointer, etc.

Do you know what surface state would you have to reset? That could be
the reason I can’t resize correctly.

Cheers

Lee> (Actually, you should probably call SDL_WM_ToggleFullScreen(), and if that

fails, do it The Hard Way. Email me directly for some work-in-progress
code that does this very thing.)

–ryan.


sdl