Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: OpenGL, C, GUI's & Linux

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Calgary, AB, Canada
    Posts
    5

    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?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,070

    Re: OpenGL, C, GUI's & Linux

    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.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    U.S.
    Posts
    149

    Re: OpenGL, C, GUI's & Linux

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

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Calgary, AB, Canada
    Posts
    5

    Re: OpenGL, C, GUI's & Linux

    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

  5. #5
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,971

    Re: OpenGL, C, GUI's & Linux

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •