[SDL] Multiple SDL Windows?
David Olofson
david at gardena.net
Sun Mar 25 20:30:41 PST 2001
On Sunday 25 March 2001 23:18, Anoq of the Sun wrote:
> David Olofson wrote:
> > Well, the separate process method would work for me as well,
> > although I'd have to implement the child-window-on-SDL-surface
> > thing myself, clipping included, meaning that I'd have to use a
> > different API when rendering in a child window. No big deal, but
> > I think it's quite wasteful if people have to reinvent the wheel
> > over and over again to do this kind of stuff, when it would fit
> > nicely into the new SDL API.
>
> Just came to think of it - I think it would currently
> be possible to allocate an SDL_Surface structure
> and initialize it with proper width, height, pitch,
> pixels pointer, cliprects etc. so that it really
> works as a sub-rectangle on a bigger SDL_Surface -
> even with correct coordinate system etc. :)
Yeah, that's exactly how I intend it to be done, at least in the case
when you don't require the surface to be readable in aconsistent way.
(See previous post with API "proposal".)
> The "only" thing which would not (currently) be
> possible is writing to a rectangle with other
> rectangles overlapping it.
>
> That's what would be possible with your
> approach... I don't know - maybe you're
> right that this should be supported natively.
> And it's still a simple kind of abstraction -
> which both X and Win32 (and possibly also most
> other Windoing systems) uses natively too...
Right; and if complex clipping is going in anyway, there shouldn't be
much glue needed between that and the sub surfaces to turn the latter
into real windows.
(Note: We're not talking about windows with decorations and crap;
just plain rectangular drawing areas, like raw X windows or Win32
drawing contexts.)
//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