SDL Fullscreen

Hi,

I’ve just joined this list after writing a couple test 3d programs
with borland 5.5 and SDL/OpenGL. I really enjoy SDL so far.

I am simply wondering if anyone is working on a fullscreen toggle for
win32. If not then I am going to. And I’ll try and maintain the same
format that is used for the x11 modes et all

Rick Richardson–
@Rick_Richardson on 12/17/2001

I’ve just joined this list after writing a couple test 3d programs
with borland 5.5 and SDL/OpenGL. I really enjoy SDL so far.

I am simply wondering if anyone is working on a fullscreen toggle for
win32. If not then I am going to. And I’ll try and maintain the same
format that is used for the x11 modes et all

http://www.libsdl.org/pipermail/sdl/2001-October/039721.html

–ryan.

I don’t see what makes it impossible to close the display without
freeing the current SDL_Surface struct, and then open the new display,
having it reuse the old SDL_Surface struct. Are people allowed to keep
pointers to other stuff as well…?

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Tuesday 18 December 2001 00:57, Ryan C. Gordon wrote:

I’ve just joined this list after writing a couple test 3d programs
with borland 5.5 and SDL/OpenGL. I really enjoy SDL so far.

I am simply wondering if anyone is working on a fullscreen toggle for
win32. If not then I am going to. And I’ll try and maintain the same
format that is used for the x11 modes et all

http://www.libsdl.org/pipermail/sdl/2001-October/039721.html

I don’t see what makes it impossible to close the display without
freeing the current SDL_Surface struct, and then open the new display,
having it reuse the old SDL_Surface struct.

The surface memory pointer changes. You have to destroy and recreate the
underlying DirectX stuff when you change a video mode.

Are people allowed to keep pointers to other stuff as well…?

Not hardware surfaces.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I don’t see what makes it impossible to close the display without
freeing the current SDL_Surface struct, and then open the new
display, having it reuse the old SDL_Surface struct.

The surface memory pointer changes. You have to destroy and recreate
the underlying DirectX stuff when you change a video mode.

Of course, but the surface pointer won’t change, as the old SDL_Surface
struct (the physical memory, that is) would be reused rather than
replaced with a new one.

‘man SDL_Surface’ says “pixels is a pointer to the actual pixel data, the
surface should be locked before accessing this field”, so I can’t see why
that should be a problem…

Are people allowed to keep pointers to other stuff as well…?

Not hardware surfaces.

And the DirectX screen surface seems pretty hard to me… :wink:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Thursday 20 December 2001 23:43, Sam Lantinga wrote:

Of course, but the surface pointer won’t change, as the old SDL_Surface
struct (the physical memory, that is) would be reused rather than
replaced with a new one.

That’s what most drivers do, but it’s not guaranteed behavior, and you
shouldn’t rely on it.

SDL 1.3 will probably have a different representation of the display,
so the point will be moot.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Of course, but the surface pointer won’t change, as the old
SDL_Surface struct (the physical memory, that is) would be reused
rather than replaced with a new one.

That’s what most drivers do, but it’s not guaranteed behavior, and you
shouldn’t rely on it.

That’s exactly the point. My original question rephrased would be “Is it
impossible for SDL to reuse the display SDL_Surface struct when
effectively closing and reopening the display?”

I guess there could be problems with the pixel format changing and that
kind of stuff. Is that why the SDL_WM_ToggleFullScreen() problem hasn’t
been investigated further?

SDL 1.3 will probably have a different representation of the display,
so the point will be moot.

Ok.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Friday 21 December 2001 01:51, Sam Lantinga wrote:

In article <mailman.1008895926.23878.sdl at libsdl.org>, Sam Lantinga wrote:

That’s what most drivers do, but it’s not guaranteed behavior, and you
shouldn’t rely on it.
SDL 1.3 will probably have a different representation of the display,
so the point will be moot.

Has programming started yet or when is it going to appear?–
No thoughts to think, no tears to cry,
all sucked dry, down to the very last breath.
Bartender, what is wrong with me, why am I so out of breath?
The captain said excuse me ma’am, this species has amused itself to death.
– Roger Waters “Amused To Death”

In article <mailman.1008895926.23878.sdl at libsdl.org>, Sam Lantinga wrote:

That’s what most drivers do, but it’s not guaranteed behavior, and you
shouldn’t rely on it.
SDL 1.3 will probably have a different representation of the display,
so the point will be moot.

Has programming started yet or when is it going to appear?

It will be started when the people involved have time to work on it. :slight_smile:
I’m in the middle of buying a condo, so that’s some of the delay. :slight_smile:

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment