Jump to content
  • Advertisement
Sign in to follow this  
subflood

OpenGL making GUI in OpenGL

This topic is 4802 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

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites


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

Share this post


Link to post
Share on other sites


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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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



Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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



Share this post


Link to post
Share on other sites
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).

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!