PDA

View Full Version : OpenGL, C, GUI's & Linux



ged
02-11-2004, 04:06 AM
I'm writing openGL code in C using GLUT. I want to make a bit more advanced GUI stuff, but still in a C environment under Linux. I checked out GTK+ (specifically GtkGLArea) but that seems to be a "C++ wrapper for a popular widget library GTK+". Any ideas?

nexusone
02-11-2004, 05:42 AM
I think most of the windowing GUI stuff is all sort of C++.
I myself have been a big C user, but mostly games/graphics not window type app's.

You can look at the QT library and mabye the KDE stuff. But you can mix C/C++ code together, that is under C++ you can compile C code.

brcain
02-11-2004, 06:35 AM
Originally posted by ged:
I'm writing openGL code in C using GLUT. I want to make a bit more advanced GUI stuff, but still in a C environment under Linux. Any ideas?

You can choose a cross-platform GUI solution (e.g. wxWindows, Qt) or an X Windows specific solution (e.g. Motif/GLX).

ged
02-11-2004, 08:13 PM
I uncover Gtkglext. "It provides additional GDK objects which support OpenGL rendering in GTK+, and GtkWidget API add-ons to make GTK+ widgets OpenGL-capable."

http://gtk.org
http://gtkglext.sourceforge.net

dorbie
02-11-2004, 09:00 PM
gtkglarea is a widget that gives you a gl drawing area inside a gtk gui.

If you want to use a GUI they pretty much all have an event loop and callbacks. Apart from that you can pretty much code in C. Even C gui APIs have event an loop and callbacks.

Guis tend to have a widget that automatically creates an OpenGL context for you to draw in, however you can roll your own using low level GLX calls and teh correct X resources.