[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: sdl & wxWindows & sound ...

Anarky wrote:
There is something that has been bugging me for a while: I've been programming in windows 3d engine stuff .. but I've been using Directx .. now I'm considering something that could be developed under Linux but also compile for windows. So, my favorite choice was wxWindows ... but that doesn't have mouse&keyboard handleing right ...
wxWindows is good, but it wouldn't be my first choice for games.
Its keyboard and mouse handing probably is actually good enough
for games, but only co-incidentally. But wxWindows' main
disadvantage is that it's pretty heavyweight (not that SDL is particularly svelte), most of its code being oriented around
widget-based 'applications' (it's fair to say that just about
all of SDL's few-hundred-K of standard runtime footprint is
devoted to the needs of games).

Of course, if the sorts of games you're planning are very
widget-based (resource-management games or such) then wxWindows
could be a great choice.

> afaik ... so it
seems I need SDL ... any idea if these two work together?
I see no reason why not, technically, except that at worst, the two
toolkits will have to stick to different windows and different
event pumps (probably wxWindows can 'swallow' foreign
windows, if you can get SDL to cough up its native window id, so at
least you can have your SDL-managed 3D area embedded in a single
window surrounded by wxWindows widgets).

But it doesn't sound ideal.

> For 3d
programming os independent it seems that SDL is pretty much a must .. but for window management (& threads & stuff) something lik wxWindows would sure come in handy .. any ideas if these mix & match?
What precisely is it you want wxWindows to do for you?  GLUT may
be a better choice if you just want something fairly cross-platform
to manage your windows, input and some *very* basic widgets for you,
as well as (of course) providing a context-setup wrapper for
3d OpenGL rendering like SDL does.

SDL has abstractions for threads, also 2d and 3d video,
keyboard, mouse, audio and some other things.

> Also on
another topic: any idea of any os-independent library to decompress/play some kind of compressed music files (like .mp3, .ogg ..?)
Sure, libvorbis is os-independant, and decodes ogg files (it's very
easy).  You'd then do the actual 'playing' through SDL's audio
abstraction or through something like OpenAL (cross-platform
3d positional audio library).

Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
"I am NOT a nut!  I am the keeper of the seven universal truths!"