OpenGL, C, GUI's & Linux

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?

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.

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).

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://gtk.org)  
  [http://gtkglext.sourceforge.net](http://gtkglext.sourceforge.net)

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.