[SDL] wxWindows

David Olofson david at olofson.net
Fri Jan 24 17:41:01 PST 2003


On Saturday 25 January 2003 00.22, Gib Bogle wrote:
> (I just found that there is a newsgroup associated with this
> mailing list.  That explains a lot :).
>
> I've been using SDL as the environment for OpenGL programming, with
> great satisfaction.  Now I need to start thinking about GUIfying my
> code.  The range of toolkits available is mind-boggling (tm), but
> wxWindows looks like a good contender.  So now I'm thinking about
> (Linux/Windows) + wxWindows + SDL + OpenGL.  Does this make sense? 
> I really like SDL, but if I'm going to use wxWindows for the GUI
> stuff, do I still need SDL?  I'm using SDL to do graphical things,
> no sound.

I have very little experience with wxWindows, but if they have an 
OpenGL widget (which many toolkits have these days), you'd probably 
get away with only wxWindows and OpenGL.

If you're still interested in running fullscreen, running on svgalib, 
GGI, fbdev, DirectX etc, using SDL might still be a good idea, but 
since you're using OpenGL, it might be better to just separate the 
OpenGL stuff out into a lib of some kind, and just provide two 
"hosts" for it; one windowed wxWindows based one, and one using SDL.


> If my question is a bit vague, it's because I don't have
> a good grasp of how SDL and wxWindows would interoperate, or of GUI
> coding in general (among other things).

I think you would have to use the window ID hack for this. That is, 
instead of SDL setting up it's own window, you pass it one by ID 
through an environment variable named SDL_WINDOWID. Whether or not 
this works with OpenGL is another matter; I frankly have no idea.


//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -'
   --- http://olofson.net --- http://www.reologica.se ---





More information about the SDL mailing list