[SDL] Re: Multiple SDL Windows?

David Olofson david.olofson at reologica.se
Fri Mar 23 02:15:47 PST 2001


On Friday 23 March 2001 05:40, Pete Shinners wrote:
> > The idea of multiple windows is mutually exclusive with the idea of
> > running fullscreen.  The only way to make them work together is if when
> > you go fullscreen you implement your own window manager and that's going
> > out of scope of a library designed to port games.
>
> instead of SDL opening multiple windows, perhaps a better way would
> be if SDL better allowed itself to be run in already created windows.
> most gui toolkits offer some type of opengl widget. perhaps when
> SDL is redesigned, it could be designed to easily allow the creation
> of "SDL widgets".

Nice idea, although it addresses a slightly different set of problems from 
what I'm thinking about, and it's not totally inclusive. It would fit in 
rather nicely, though, at least from the API POV, I think.

Anyway, I don't see how it could be significantly less complicated than 
actually supporting multiple windows "properly" in the API as well.

Also note "connecting" SDL to any form of platform dependent windows is 
inherently non-portable. Just for starters, you'll get at least one argument 
that has different types on different targets.


> of course, there are still many sticky issues with that. first is
> that not all gui toolkits are crossplatform. it would also have to
> be clearly defined how SDL's window manger-ish functions would behave
> in certain environments. (although that is probably a good thing :] )

Well, if it's supposed to work properly with the WM calls as well, it might 
as well be done properly... We're not talking about just adding a flag to 
SDL_SetVideoMode() anyway.


> anyways, just a different perspective on things. technically it would
> give you the same results. multiple SDL windows.

Yeah, but in a way that's totally non-portable, in some cases even when done 
on top of portable toolkits! (Well, unless SDL is supposed to explicitly 
support those toolkits, just to be able to get the window handles out of 
their widgets...) And it still wouldn't work in fullscreen modes, or for 
child windows on SDL surfaces.

Why mess with that if you don't *really* want to run SDL in an existing 
window?


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david at linuxdj.com -'



More information about the SDL mailing list