hello, everyone
let me start off by saying that i am a big fan of sdl.
ok. here it is:
i want to use sdl as common ground for a gfx lib, similiar to gtk and such,
that is cross platform (really just win32 and linux/x, but the thers are
welcome). is this a wise choice?
Not sure for the general case, but I’m planning to do something like that for
MAIA… (See .sig.)
The design goals for that toolkit are quite different from “normal” toolkits
like GTK+ and Qt, as it’s meant for the kind of GUIs used for VST (Win32 and
MacOS) and DirectX audio plugins. That is, lots of chrome and detailed design
time control over look and feel, but limited support for scaling, themes,
widget “packing” and other features that tend to break design and rendering
quality.
In short, it’s going to be more like Shockwave than a traditional toolkit.
one thing that prompted me to ask this is the situation of multiple frame
windows (wnds on the desktop). i dont really think this is supported. how
hard would it be for this to be supported?
This has been discussed some on the list recently, mostly by me and “Anoq of
the Sun” . Can’t say how hard it would be to
actually implement, but someone will probably try to do it sooner or later.
That is, unless SDL 1.3 will do it, and is in a usable state soon enough.
would i be better off coding this x-platform lib myself?
Depends… Probably not, if SDL fits the bill well enough. It’s most probably
less work to hack SDL than to code something from scratch, at least if you
need more than the absolute basic stuff.
Personally, I absolutely need alpha blending (for translucency effects and
antialiasing) and decent rendering performance for the MAIA GUI solution, and
the most important features are related to RGB image blitting, so SDL seems
to fit rather well. There are drawing primitive libs and stuff for SDL, to
deal with more “traditional” GUI toolkit rendering methods as well.
also, one last question before i go:
can i resize an [sdl] window without losing its contents? 9ie: how well doe
sdl resond to WM_RESIZE (on win32))?
I’m not sure what exactly happens on Win32, but regardless of platform, you
have to reinitialize the video subsystem with the new size. I’d guess SDL
tells Win32 not to clear out the window automatically, but nevertheless,
you’ll have to repaint the “screen” surface sooner or later anyhow, even if
you may not have to do it right after the resize. (Might work to reinit SDL
video, and then, if the window got larger, first render only the part that
just became visible, followed by an SDL_UpdateRect() call to blit only that
part into the window. Not sure if you can rely on that to work on all
targets, though.)
//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.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
--------------------------------------> david at linuxdj.com -'On Monday 28 May 2001 12:43, etoffi jones wrote: