Jump to content
  • Advertisement
Sign in to follow this  
golgoth13

SDL and UI

This topic is 4058 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all! I would like to make a 3d editor like application with menus, dialog boxes, etc. im currently using SLD... is there any cross platform UI solution? why not include UI features into sdl? thx [Edited by - golgoth13 on June 7, 2007 3:57:28 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
why not include UI features into sdl?


SDL is a layer that abstracts system window management, input and graphics. Given this, it wouldn't be of much sense to put effort into making an UI, instead of focusing on the really important stuff.

Share this post


Link to post
Share on other sites
not important? SDL_UI will do just fine... extend the possibilities... one library to develop application on any platform... cant you see it?!

Share this post


Link to post
Share on other sites
Quote:
Original post by golgoth13
not important? SDL_UI will do just fine... extend the possibilities... one library to develop application on any platform... cant you see it?!


There are quite a lot of GUI toolkits built on top of SDL. Guichan and ParaGUI are apparently popular.

If you want something that'll make use of a 3D API, you'll probably want to go with something like CEGUI or some engine with a toolkit (like, eg, Irrlicht). They aren't related to SDL though.

Finally, if what you want is to get SDL to render to a 3rd party toolkit's windows like you would with, say, DirectDraw and MFC, you're going to have a hard time. It's possible with the SDL_WINDOWID hack, sometimes. Such portable libraries include Qt, wxWidgets, FLTK, the FOX toolkit, Ultimate++ and Gtk+, for example.

Share this post


Link to post
Share on other sites
Oh... that is good information... I can almost see the light... must choose one lib now... I ll look at them closely... any advantage of using one lib in particular? window, mac and linux would be fine.

Quote:

If you want something that'll make use of a 3D API


im not sure what u meant there... I do have a 3d engine using opengl in a sdl framework... I don’t need any 3d ui if this is what you are saying... but all other 2d widgets are what I need...

im going to look at SDL_WINDOWID hack... interesting... but still hard to believe we have to hack such thing...

Share this post


Link to post
Share on other sites
Quote:
Original post by golgoth13
Oh... that is good information... I can almost see the light... must choose one lib now... I ll look at them closely... any advantage of using one lib in particular? window, mac and linux would be fine.


I think Guichan is the most popular of them all, but it largely depends on your needs. I don't think any of them will be able to handle CJK or RTL languages. Most of them probably don't handle Unicode either.


Quote:

Quote:

If you want something that'll make use of a 3D API


im not sure what u meant there... I do have a 3d engine using opengl in a sdl framework... I don’t need any 3d ui if this is what you are saying... but all other 2d widgets are what I need...


If you want a GUI that'll be 2D but rendered by OpenGL, then CEGUI is probably what you're looking for. If, OTOH, you want something that looks like regular Win32 controls (on Windows, anyway), then Qt, wxWidgets, etc, are what you're looking for.


Quote:
im going to look at SDL_WINDOWID hack... interesting... but still hard to believe we have to hack such thing...


I think SDL 1.3 will fix that, but it's not production-ready yet. It's a problem for many people, but then again SDL wasn't meant for tools, and I suspect it's victim of its success. [smile]

Share this post


Link to post
Share on other sites
There's one written in C that works with OpenGL under SDL or SDL native for that matter. It's AGAR and it seems to be very powerful... if you can get it to build from the source using the autoconf-based configure scripts.

Share this post


Link to post
Share on other sites
thx for your inputs guys... I really appreciate it.

then again... im a little confused... I did compile wxWidgets successfully and implement it into my project... my framework being sdl... let say I want a standard File->Open menu... can I expect it to work in or on top of my SDL window? or do I need to embed the SDL window within a wxWidgets context?

or like samuraicrow mentioned, use something like Agar being SDL native would be much easier? can anyone help me clear this up?

Share this post


Link to post
Share on other sites
I ve been looking at Agar Lib and it seams interesting indeed... the only problem is I ve been in the dark for a long time regarding the make file technique... even though I see this all over... I have no idea how it works... here is what the install note looks like:

Quote:

Build and install the Agar library:

$ ./configure [--help]
$ make depend && make
# make install
$ agar-config --version
1.0-beta
$ cat config.log | mail -s "compiles ok" report@agar.csoft.org

…SNIP

In the Agar root directory we have the files:

configure
configure.in
Makefile
Makefile.config

Have tried to execute them via cmd… didn’t do anything… there is no VS project to build... honestly, I have no clue what to do with this... seams like everyone on the planet knows how to but me... if it is not too much trouble, any help would be greatly appreciated.

thx again

Share this post


Link to post
Share on other sites
Quote:
Original post by golgoth13
let say I want a standard File->Open menu... can I expect it to work in or on top of my SDL window? or do I need to embed the SDL window within a wxWidgets context?


You'll have to tell SDL to render to a wxWidgets widget, which is exactly what the aforementioned SDL_WINDOWID hack is meant to do. I wish you good luck with it though, as it's quite tricky.


Quote:
or like samuraicrow mentioned, use something like Agar being SDL native would be much easier? can anyone help me clear this up?


I suspect it would be easier to set it up. I don't know if it'd be easier to use in a large project though (I've never used Agar). Since you're using OpenGL, I'd go with CEGUI and be done with it, although the learning curve is probably steeper. A lot of people here seem to use it, so I'm sure it has Visual Studio project files.


Quote:
Have tried to execute them via cmd… didn’t do anything… there is no VS project to build... honestly, I have no clue what to do with this... seams like everyone on the planet knows how to but me... if it is not too much trouble, any help would be greatly appreciated.


There is apparently no support for VS out of the box. I suppose it's meant to be using with MinGW or the Cygwin version of GCC in either MSYS or the Cygwin shell.

Maybe is it as simple as creating a new DLL project, adding all the source files to it and linking against SDL, SDL_image, etc. Maybe not. The only moment I use Windows is to make sure my software ports correctly, and I usually don't work with C++ (and when I do, I use the MinGW or Cygwin port of GCC), so I can't be of much help there.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!