OpenGL Utility Toolkit

Last updated
OpenGL Utility Toolkit
Fenetre glut.png
Developer(s) Mark Kilgard
Operating system Cross-platform
Platform Cross-platform
Type API
Website www.opengl.org/resources/libraries/glut/   OOjs UI icon edit-ltr-progressive.svg

The OpenGL Utility Toolkit (GLUT) is a library of utilities for OpenGL programs, which primarily perform system-level I/O with the host operating system. Functions performed include window definition, window control, and monitoring of keyboard and mouse input. Routines for drawing a number of geometric primitives (both in solid and wireframe mode) are also provided, including cubes, spheres and the Utah teapot. GLUT also has some limited support for creating pop-up menus.

Contents

GLUT was written by Mark J. Kilgard, author of OpenGL Programming for the X Window System and The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics, while he was working for Silicon Graphics Inc.

The two aims of GLUT are to allow the creation of rather portable code between operating systems (GLUT is cross-platform) and to make learning OpenGL easier. Getting started with OpenGL programming while using GLUT often takes only a few lines of code and does not require knowledge of operating system–specific windowing APIs.

All GLUT functions start with the glut prefix (for example, glutPostRedisplay marks the current window as needing to be redrawn).

Implementations

The original GLUT library by Mark Kilgard supports the X Window System (GLX) and was ported to Microsoft Windows (WGL) by Nate Robins. Additionally, macOS ships with a GLUT framework that supports its own NSGL/CGL.

Kilgard's GLUT library is no longer maintained, and its license did not permit the redistribution of modified versions of the library. This spurred the need for free software or open source reimplementations of the API from scratch. The first such library was FreeGLUT, which aims to be a reasonably close reproduction, though introducing a small number of new functions to deal with GLUT's limitations. OpenGLUT, a fork of FreeGLUT, adds a number of new features to the original API, but work on it ceased in May 2005.

Mark Kilgard has a GitHub repository for GLUT. [1] The glut.h header file contains the following license: [2]

/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998, 2000, 2006, 2010. */  /* This program is freely distributable without licensing fees  and is   provided without guarantee or warrantee expressed or  implied. This   program is -not- in the public domain. */

Limitations

Some of GLUT's original design decisions made it hard for programmers to perform desired tasks. This led many to create non-canon patches and extensions to GLUT. Some free software or open source reimplementations also include fixes.

Some of the more notable limitations of the original GLUT library include:

Since it is no longer maintained (essentially replaced by the open source FreeGLUT) the above design issues are still not resolved in the original GLUT.

See also

Related Research Articles

OpenGL Cross-platform graphics API

OpenGL is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.

Simple DirectMedia Layer Free software multimedia library

Simple DirectMedia Layer (SDL) is a cross-platform software development library designed to provide a hardware abstraction layer for computer multimedia hardware components. Software developers can use it to write high-performance computer games and other multimedia applications that can run on many operating systems such as Android, iOS, Linux, macOS, and Windows.

Wine (software) Windows compatibility software

Wine is a free and open-source compatibility layer that aims to allow application software and computer games developed for Microsoft Windows to run on Unix-like operating systems. Wine also provides a software library, named Winelib, against which developers can compile Windows applications to help port them to Unix-like systems.

GLX is an extension to the X Window System core protocol providing an interface between OpenGL and the X Window System as well as extensions to OpenGL itself. It enables programs wishing to use OpenGL to do so within a window provided by the X Window System. GLX distinguishes two "states": indirect state and direct state.

FLTK

Fast Light Toolkit is a cross-platform widget library for graphical user interfaces (GUIs), developed by Bill Spitzak and others. Made to accommodate 3D graphics programming, it has an interface to OpenGL, but it is also suitable for general GUI programming.

Windows Forms Graphical user interface software library

Windows Forms (WinForms) is a free and open-source graphical (GUI) class library included as a part of Microsoft .NET, .NET Framework or Mono Framework, providing a platform to write client applications for desktop, laptop, and tablet PCs. While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a comparable paradigm and only acts as a platform for the user interface tier in a multi-tier solution.

Mark Kilgard American computer programmer

Mark J. Kilgard is a graphics software engineer working at Nvidia.

GDK Software library

GDK is a library that acts as a wrapper around the low-level functions provided by the underlying windowing and graphics systems. GDK lies between the display server and the GTK library, handling basic rendering such as drawing primitives, raster graphics (bitmaps), cursors, fonts, as well as window events and drag-and-drop functionality.

Core Foundation is a C application programming interface (API) written by Apple for its operating systems, and is a mix of low-level routines and wrapper functions. Most Core Foundation routines follow a certain naming convention that deal with opaque objects, for example CFDictionaryRef for functions whose names begin with CFDictionary, and these objects are often reference counted (manually) through CFRetain and CFRelease. Internally, Core Foundation forms the base of the types in the Objective-C standard library and the Carbon API.

FreeGLUT is an open-source alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions. FreeGLUT is intended to be a full replacement for GLUT, and has only a few differences.

The IUP Portable User Interface is a computer software development kit that provides a portable, scriptable toolkit to build graphical user interfaces (GUIs) using the programming languages C, Perl, Lua, Nim and Zig, among others. This allows rapid, zero-compile prototyping and refinement of deployable GUI applications.

Vala (programming language) Programming language

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.

Clutter is a GObject-based graphics library for creating hardware-accelerated user interfaces. Clutter is an OpenGL-based 'interactive canvas' library and does not contain any graphical control elements. It relies upon OpenGL (1.4+) or OpenGL ES for rendering,. It also supports media playback using GStreamer and 2D graphics rendering using Cairo.

openFrameworks Open-source programming toolkit

openFrameworks is an open source toolkit designed for creative coding founded by Zachary Lieberman, Theo Watson and Arturo Castro. OpenFrameworks is written in C++ and built on top of OpenGL. It runs on Microsoft Windows, macOS, Linux, iOS, Android and Emscripten. It is maintained by Zachary Lieberman, Theo Watson and Arturo Castro with contributions by other members of the openFrameworks community.

Simple and Fast Multimedia Library Graphics and Multimedia Library written in C++

Simple and Fast Multimedia Library (SFML) is a cross-platform software development library designed to provide a simple application programming interface (API) to various multimedia components in computers. It is written in C++ with bindings available for Ada, C, Crystal, D, Euphoria, Go, Java, Julia, .NET, Nim, OCaml, Python, Ruby, and Rust. Experimental mobile ports were made available for Android and iOS with the release of SFML 2.2.

GLFW is a lightweight utility library for use with OpenGL. GLFW stands for Graphics Library Framework. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mouse input.

mpv (media player) Free and open-source media player software

mpv is free and open-source media player software based on MPlayer, mplayer2 and FFmpeg. It runs on several operating systems, including Unix-like operating systems and Microsoft Windows, along with having an Android port called mpv-android. It is cross-platform, running on ARM, PowerPC, x86/IA-32, x86-64, and MIPS architecture.

Raylib Game programming library

raylib is a cross-platform open-source software development library. The library was made to create graphical applications and games.

Fyne (software) Graphical toolkit for building cross platform GUIs

Fyne is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs) across desktop and mobile platforms. Fyne uses OpenGL to provide cross-platform graphics. It is inspired by the principles of Material Design to create applications that look and behave consistently across all platforms. It is licensed under the terms of the 3-clause BSD License, supporting the creation of free and proprietary applications. In December 2019 Fyne became the most popular GUI toolkit for Go, by GitHub star count and in early February 2020 it was trending as #1 project in GitHub trending ranks.

References

  1. "Glut". GitHub . 21 November 2021.
  2. "Glut". GitHub . 21 November 2021.