[SDL] Re: Multiple SDL Windows again...

David Olofson david.olofson at reologica.se
Mon Apr 30 01:28:31 PDT 2001


On Monday 30 April 2001 01:47, Ryan C. Gordon wrote:
> > > This can't be how real GUI's do it!?!  That just sounds so wasteful to
> > > me.
> >
> > Wasteful or not; that *is* how most toolkits do it, as there is no other
> > way of rendering outside a window... And it's not really that bad, if
> > implemented properly. Have a look at SDL's clipping, add some window
> > management functionality to keep track of dirty areas, and you get the
> > idea.
>
> This isn't really how most GUIs do it.
>
> (Generally speaking) At the windowing system level, there is an abstract
> concept of a "window", which isn't nearly as resource intensive as, say,
> an Xterm or Netscape's "window," which are comprised of several
> windowing system windows.

I was thinking in rendering terms, and I was taking for granted that no one 
was talking of "real" windows. (With title bar, borders etc.)


> Different systems call these different things: controls, components,
> widgets. They are, individually, designed for piling next to and on top of
> each other in large quantities. They each get individual events
> (mouseovers, etc), and their rendering doesn't overwrite the graphical
> contents of any other overlapping widgets.
>
> An SDL window is much, much heavier than one of these, as it is already a
> collection of widgets (titlebar, maximize button, surface, etc). Each SDL
> window gets it's own events and handles it's own redraw, but in terms of a
> UI toolkit, this is accidental.

Right; as SDL looks now, the closest you can get is a borderless window. 
However, whether or not that's heavier than a "low level window" (or drawing 
context, or whatever targets call it) depends on the implementation... The 
SDL_Surface abstraction would be very similar for "real" windows and the low 
level ones.


//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