OpenGL and GUI

Sep 28, 2010 at 3:43am
Hi.

I have learned C++ and OpenGL and I consider myself quite proficient with them. What I would like to learn now is a way to create some kind of GUI to use with my applications, but I really can't find anything with this purpose.

I've looked at Qt, but it requires me to change all of my structures in order to integrate them with the framework (I didn't like the widget-based approach).

My question is: is there any kind of API I can use to easily incorporate some graphic interface to my existing programs?

Thanks.
Sep 28, 2010 at 4:52am
Well this may be a bit of a stretch. But I actually really like using SDL for all my GUI programming needs, it's very simple, and there are amazing tutorials available.

If you're just working with windows, I tentatively suggest learning the Windows API. It isn't something I suggest lightly as it is not cross-platform and therefore pretty much against my general programming wishes but it is useful...

However if you just want graphics, I would definitely suggest SDL. For the tutorials, well there's only one place to go really, http://lazyfoo.net/SDL_tutorials/index.php -a couple hours of reading will reward you with much in the way of graphics programming. Good luck and I hope you enjoy your time learning!
Last edited on Sep 28, 2010 at 4:52am
Sep 28, 2010 at 9:48am
You can try GtkGLExt it allows to use GTK+ GUI and OpenGL Graphics at the same time
Sep 28, 2010 at 1:30pm
Hi ...

I am using Gtk to display OpenGL. You can look for GtkGlExt(C version) or GtkGlExtmm(C++ version).
1) Then you create a drawing area widget with OpenGL capabilites(GtkGLDrawingArea widget).
2) After having such widget, sets important methods(equivalent to glutDisplayFunc and glutReshapeFunc)
3) gldrawable->gl_begin(get_gl_context()) // notifying Gtk that after this line, OpenGL command be used
<.... place you OpenGL command .....>
gldrawable->gl_end()

You can look for tutorials, and for FULL example at the link below
http://gtkglextmm.sourcearchive.com/documentation/1.2.0-4ubuntu1/gears_8cc-example.html

Hops thats will helpfull.

YyYo

Topic archived. No new replies allowed.