about gltk

gltk is a C++ Widget library built on GLUT. The API of gltk is modeled after gtkmm, the C++ interface of the GTK+ library. The implementation of gltk was inspired by GLUI. By building on GLUT, the library is readily ported to platforms where GLUT (or FreeGLUT) is available. These include Linux, Windows, and Mac OS X.

A loose goal of gltk is to be API compatible with gtkmm, where people can, ideally, replace the Gtk namespace by gltk and have their programs compile and run on platforms where gtkmm is not available. Under the limitation of GLUT, such goal can only be filled partially. In reality, this project only aims for a close approximation to the most commonly used part of the API, so the author does not have to rewrite his existing gtkmm codes to make his programs portable with GLUT.

Following gtkmm, the communication between objects in the library is provided by the signal-slot API of libsigc++. While libsigc++ is readily ported to a wide range of platforms, to minimize the prerequisites of gltk, a very limited, in-house substitute of libsigc++, under the same sigc namespace, is provided in the header sigc.hh with the aim of making it source-compatible with libsigc++. The users of the library may replace sigc.hh with the real libsigc++ when it's available to gain flexibility and performance.

home