OpenGL UI Widgets for Linux

Brian Paul (

25 June 2000

This document describes a number of user interface (UI) widgets or components which may be used to integrate OpenGL into a traditional graphical application.

1. Copyright

Copyright (c) 2000 by Brian Paul. All Rights Reserved.

Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies.

Permission to modify this document may be granted to those who get approval from Brian Paul.

2. Introduction

In most 3D applications, other than games, the 3D content exists within a traditional graphical user interface. For example, the primary workspace in a 3D modelling program is a 3D viewing window surrounded by UI buttons, menus and scrollbars.

The best way to incorporate OpenGL drawing in graphical applications is to use an OpenGL user interface component or widget. On Linux we have a large number of user interface toolkits to choose from. Luckily, there are OpenGL widgets for most of these toolkits.

The following sections list and briefly describe the most popular of these OpenGL widgets.

3. Xt/Motif

Xt, the X Toolkit Instrinsics library, is built on Xlib and is designed to be a foundation on which user interface toolkits may be built. The best known example of this is Motif.

The GLwDrawingArea (Xt-based) and GLwMDrawingArea (Motif-based) widgets were probably the first UI widgets for OpenGL.


OpenGL and X, Part 3: Integrating OpenGL with Motif by Mark Kilgard. (

4. Qt

The Qt toolkit was developed by Trolltech AS of Norway and is the UI toolkit for the popular K Desktop Environment (KDE).

The OpenGL widget, QGLWidget, is included in both the Professional and Free Editions of Qt.


Qt OpenGL Extension (

Trolltech Home Page (

5. GTK+

The GTK toolkit was originally written for the GIMP, a popular image editing application. GTK has since evolved into GTK+ and is now the UI toolkit used by the GNOME desktop environment.

GtkGLArea is the OpenGL widget for GTK+. There is also GtkGLArea--, a C++ OpenGL widget for GTK-- (the C++ version of GTK+.)


GtkGLArea ( jlof/gtkglarea/)

GtkGLArea-- ( kenelson/gtk-glarea/)

GTK Home Page (

6. Tcl/Tk

Tcl is a popular interpreted scripting language and Tk is a user interface built on top of it.

The Togl widget is a Tcl/Tk widget for OpenGL rendering. It was originally written by Ben Bederson and later enhanced by Brian Paul.


Togl home page (

Tcl/Tk Information page (

7. FOX

FOX is a C++ user interface toolkit designed for ease of use.

The FXGLCanvas widget is a basic OpenGL canvas while FXGLViewer is a complete 3D model viewer canvas with 3D rotation, translation and zooming.


FOX Home Page (


GLOW is cross-platfrom C++ tookit based on GLUT especially designed for 3D OpenGL applications.

The GlowWindow class defines OpenGL rendering windows.


GLOW Home Page ( dazuma/glow/index.html)

9. JX

JX is an application framework and widget library designed and optimized for the X Window System.

The J3D and JX3D components support OpenGL rendering.


J3D Information (

JX Home Page (

10. XForms

XForms is a free X-based GUI toolkit written by T. C. Zhao based on the original Forms library by Mark Overmars.

The glcanvas component is used for OpenGL rendering.


OpenGL canvas documentation ( dau/xforms/node5.html#SECTION05840700000000000000)

XForms Home Page ( xforms/)

11. FLTK

FLTK (Fast Light ToolKit) is a LGPL'd, C++-based interface toolkit for the X11/Unix and Win32. It was originally developed at Digital Domain.

The Fl_Gl_Window widget is used for OpenGL rendering.


FLTK Home Page (

Fl_Gl_Window widget reference page (