Graphics Programming
with GLUT, GLUI,
and GTK+
8
In Chapter 7, we discussed the fundamentals of graphics programming based
on theVoglegraphics library. In this chapter, we discuss further concepts of
graphics programming based on the commercial-gradeGlut,Glui,andGtk+
utility toolboxes. All three are freely available for a variety of platforms:
- Glutis built on the OpenGL graphics library, which is the industry
standard for a broad range of free software and commercial applications. - Gluiis built on Glutto provide a Graphical User Interface (GUI)
equipped with controls such as buttons, check-boxes, and radio buttons. - Gtk+is a popular widget toolbox.
Once we have mastered the functions implemented in these libraries, we can
produce professional graphics displays and applications using C++ code that
is portable virtually across any computer platform.
8.1 GLUT.................................
The newest edition ofGlutis implemented in theFreeGlutlibrary, which
includes theMesalibrary. The latter is the free implementation of OpenGL.
An excellent manual of theGlutfunctions and their usage can be found at
several Internet sites including:
http://pyopengl.sourceforge.net/documentation/manual/reference-GLUT
http://www.opengl.org/documentation/specs/glut
To compile a C++ program namedphoebe.ccand link it with theGlut
library in Unix, we use the makefile: