OpenGL Utility Toolkit

The OpenGL Utility Toolkit (GLUT ) is an extensive library and collection of OpenGL programs that implement low-level input and output operations of each operating system in the first place. This toolkit includes this features to define the windows, to control this window and return to collect user input. It functions are also provided, which allow the drawing of primitive geometric structures (as wireframe or solid body ). The structures include cubes, spheres, the Utah Teapot and more based on triangles or squares geometric shapes. Additional there are slightly limited functions for creating pop-up menus.

GLUT was originally developed by Mark J. Kilgard, author of OpenGL Programming for the X Window System and The Cg Tutorial: The Definitive Guide to designed Programmable Real-Time Graphics, during his activities at Silicon Graphics Inc. and implemented.

The two objectives of the GL toolkits were the creation of portable code as possible for different platforms and facilitating learning OpenGL. The introduction to OpenGL is greatly facilitated by the use of GLUT because it obscured by encapsulating the peculiarities of the operating system - specific functions. So it has to be realized extensive OpenGL programs made ​​possible by a few lines and relatively little knowledge.

GLUT is mainly suitable for small to medium size projects and provides an interface for the languages ​​C, C , Fortran, and Ada.

All GLUT- specific functions always begin with the prefix glut. For example initializes the call glutInit ( & argc, argv ); GLUT system in C and C.

Implementations

The original GLUT by Mark Kilgard supported only the X Window System in the form of GLX. It was later ported to Microsoft Windows in the form of WGL and for Mac OS X in the form of NSGL / CGL.

Kilgards GLUT implementation is no longer maintained for some time and the underlying license does not allow redistribution or a modified form. This led to more complete Reimplementierungen, preferably as open source variants.

The first free implementation freeglut sought a 100% compatible version. They also introduced a few new features in order to correct some of the limitations of the original GLUT version better.

The second major reimplementation openglut is a fork of the freeglut version and sought an extension of the original functionality to. The progress came to a halt in May 2005, however.

Limitations

Some of the design decisions of the original GLUT version make it almost impossible to implement certain tasks to the developers. This led to many more unmentioned and / or unknown patches and expansions. Some projects result in an even own Reimplementierungen and corrections.

Some of the known GLUT limitations are as follows:

  • The developer must always make the call glutMainLoop (), but that call never returns. This behavior makes it almost impossible for developers to use GLUT in programs who need to maintain complete control over their event loops themselves. A non- correction to this problem is (usually glutCheckLoop () ), and in which performs only a single iteration of the GLUT- event loop to introduce a function. Another method often used is the outsourcing of the GLUT event loop in a thread. This variant, however, is strongly dependent on the operating system and often leads to unwanted synchronization problems.
  • The fact that glutMainLoop () never returns a result, an application with GLUT never ends normally. freeglut corrected this problem by introducing the function glutLeaveMainLoop (), which forces a compliant termination of glutMainLoop ().
  • GLUT terminates the program or the process if the actual display window is closed. For some applications this may be an undesirable behavior. To work around this problem perform some Reimplementierungen an additional callback such as glutWMCloseFunc ().

Since the original GLUT version is no longer being maintained, it was more or less replaced by freeglut the open source version.

Controversy

The various GLUT versions are available in source code form and support a number of platforms. But GLUT is neither public domain nor open source and therefore may not be modified or extended to pass.

See

  • OpenGL utility library ( GLU)
  • Simple DirectMedia Layer (SDL )
621524
de