views:

772

answers:

7

I'm looking for a window... ugh... thing for OpenGL, I've been using SDL but more recently found that its not quite up to my needs in at least any code I've seen. I'd like to find some GUI library that allows me to develop using OpenGL (and SDL if at all possible) with a menu bar, possibly options at the side, and a working-out-of-the-box close button. Qt is the sort of thing I'm looking for, but I'd like to work with something that doesn't force me to make it open source.

A quick list of things I want, a working close button, ability to use OGL, cross platform, any licence that doesn't force me to become open source, free, and the ability to go full screen and change resolution on the fly.

I have searched myself, I'm not a lazy person really ;) I just want to get some opinions here before I dive off into anything and find its not really suitable for my needs.

Thanks in advance for any feedback.

+3  A: 

Try wxWidgets. There's a link on using it with OpenGL here.

Dan Olson
http://docs.wxwidgets.org/2.8/wx_wxglcanvas.html for wxGLCanvas.
aib
I agree with wxWidgets recommendation.
Ivan Vučica
+1  A: 

GLUT (GL Utility Toolkit) comes close to what you're looking for. It's quick and easy and cross-platform, although it does not have support for menu bars. This page also has a number of GLUT-like alternatives.

Adam Rosenfield
GLUT's pretty icky (global variables are *so* 1999 ;) but it's everywhere OpenGL is, making it the simplest solution to get off the ground with.
ephemient
Global variables *ROCK*. See also http://www.yosefk.com/blog/i-love-globals-or-google-core-dump.html
Adam Rosenfield
A: 

SDL can create OpenGL Windows.

http://gpwiki.org/index.php/C:SDL_OGL

ddcruver
I'm aware of that, as I said I'm using SDL right now, but it doesn't contain anywhere near enough features to make it usable by the applications I'm planning on churning out soon.
Auraomega
Hmm, if SDL doesn't have enough features for you, GLUT probably won't be good either. What are you missing?
ephemient
+3  A: 

When Qt 4.5 comes out (later this month, I think) it will be LGPL, so if you can wait a couple weeks, you can use Qt without having to open-source your program.

Branan
I would also highly recommend Qt4. It is much more mature than wxWidgets, and also more powerful in its OpenGL integration. You can tell Qt to use GL as rendering backend and it is also possible to do Qt painting tasks on an QGLWidget, i.e. inside a GL context.
ypnos
+1  A: 

For the out-of-the-box close-button enabled window, you can have GLUT, as mentionned before, and if your additional GUI needs are really simple, I think GLUT can provide you some.

You could also go for simple OpenGL rendered menus and buttons, either using NVidia Widgets or AntTweakBar.

rotoglup
If he's not happy with SDL, how will he be happy with GLUT?That said, I'm still giving you a +1 because of recommendation for rendered widgets.
Ivan Vučica
+1  A: 

You don't need 'support' for OGL as long as you can pass it the correct the information. On windows at least, if you have a windowing API that you can hook the HWND from, you can set up OGL to use pretty much any window you want. I've done this successfully with wxWidgets and straight win32. I can't help you with other platforms, but I suspect you can do something similar.

This works with D3D too and is a nice way of separating your rendering code from your windowing API.

BigSandwich
I've done this with GTK on Linux in the past as well.
Dan Olson
A: 

There are numerous rendered widget libraries such as those that rotoglup suggested. Have a peek at CEGUI and QuickGUI, they may make you happy (although CEGUI disappoints me with its abuse of XML). And here's a shameless plug: GLICT.

Ivan Vučica