making GUI in OpenGL

Started by
12 comments, last by GameDev.net 18 years, 10 months ago
Can you actually make a GUI with OpenGL? I do not mean drawing the actual window but the actual background, buttons, form fields, etc. Has this ever been done before and is it practical?
Advertisement
Yes, you can do it. As for practicality it all depends. If you know what you need, and know you can do it, and nothing exists that has the functionality you need, then I'd say it's worth while to make a library. However, there are quite a few good libraries out that can aid you. For example, take a look at CEGUI. I know that Ogre uses CEGUI as it's official GUI library, so it's definitly good. I do not know, however, how to get it to work on OpenGL.
If you want to make a map editor sort of thing with OpenGL windows inside a GUI, i recomend wxWidgets. In fact, i recomend it for any GUI program. Can be difficult to set up unless you use pre compiled binaries, but once you do get it going it is great. Also it is cross platform (with a recompile of course) so its possible (in theory) to write code that will compile across Windows, Linux, Mac or whatever else it supports. I have not tried it on anything other than Windows at this stage though.
Quote:Can you actually make a GUI with OpenGL?

as Drew_Benton said yep (see my page journal entry about 3/4months ago) though its quite a bit of work, if u wanna stand on the shoulders of giants i recommend using an already existing thingge. just had a look at CEGUI myself, looks nice.
http://www.cegui.org.uk/modules/myalbum/photo.php?lid=9
i done something similar a couple of weeks ago (particle system editor) i used fltk though (very simple to use)


Yes, that can be done - I've written pretty sophisticated (but poorly implemented) GUI engine few months ago. It's using OpenGL textures, which are laid on GL_QUADS.

How it looks:


Everything what you see on this screenshot, are quads with different textures. So, yes, it's very pratical approach :-)

If you want to see it in action, you can downlaod it from my sig...


Other links:

OpenGL GUI tutorials
LibUFO


I'm in the process of writing a GUI package for OpenGL and DirectX 9.0, that's what I have so far:
Panels
Buttons
Radio Buttons
Check Boxes
Labels
Sliders
Separators

Anything else I'm missing?
Quote:Original post by Mr Lane
If you want to make a map editor sort of thing with OpenGL windows inside a GUI, i recomend wxWidgets. In fact, i recomend it for any GUI program. Can be difficult to set up unless you use pre compiled binaries, but once you do get it going it is great. Also it is cross platform (with a recompile of course) so its possible (in theory) to write code that will compile across Windows, Linux, Mac or whatever else it supports. I have not tried it on anything other than Windows at this stage though.


For simple map editor stuff, make sure to take a look at the AGAR openGL GUI library, it's plain ANSI C and depends only on SDL (truly cross platform) - and is available via a BSD licence.

http://agar.csoft.org/index.html.en

Screenshtots: http://agar.csoft.org/screenshots.html.en

If you need something that's truly powerful (OOP), advanced, cross-platform portable with ZERO dependencies (direct openGL calls & primitives), make sure to check out the opensource NUI / NGL openGL GUI c++ library:

http://home.gna.org/ngl/about.html

Screenshots: http://home.gna.org/ngl/shots.html



Quote:Original post by JavaCoolDude

I'm in the process of writing a GUI package for OpenGL and DirectX 9.0, that's what I have so far:
Panels
Buttons
Radio Buttons
Check Boxes
Labels
Sliders
Separators

Anything else I'm missing?


Depends on the scope of your library, but personally I'm usually looking for GUI libs that also provide:

- menus (popups)
- menubars (multiple cascaded menu popups)
- combo box
- listview
- treeview
- tooltips
- configurable fonts



have you tried guichan.sourceforge.net?
I'm planning on releasing a fully fledged OpenGL GUI with additional tools such as animation and GUI editors, so you might want to wait for a couple of days and download it off my site( see link at the end of post).

This topic is closed to new replies.

Advertisement