Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OpenGL Utility Toolkit
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Multiple issues| {{primary sources|date=September 2011}} {{more footnotes|date=September 2011}} }} {{Infobox software | name = OpenGL Utility Toolkit | logo = | logo caption = | screenshot = Fenetre glut.png | caption = | collapsible = | author = | developer = [[Mark Kilgard]] | released = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | discontinued = | latest release version = | latest release date = <!-- {{release date and age|YYYY|MM|DD}}<ref>{{cite web|title=|url=|date=|accessdate=}}</ref> --> | latest preview version = | latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | programming language = | operating system = [[Cross-platform]] | platform = [[Cross-platform]] | size = | language = | genre = [[Application programming interface|API]] | license = | website = }} The '''OpenGL Utility Toolkit''' ('''GLUT''') is a [[library (computing)|library]] of utilities for [[OpenGL]] programs, which primarily perform system-level [[input/output|I/O]] with the host [[operating system]]. Functions performed include window definition, window control, and monitoring of [[Computer keyboard|keyboard]] and [[Computer mouse|mouse]] input. Routines for drawing a number of geometric primitives (both in solid and wireframe mode) are also provided, including [[cube (geometry)|cubes]], [[sphere]]s and the [[Utah teapot]]. GLUT also has some limited support for creating pop-up menus. GLUT was written by [[Mark Kilgard|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 [[application programming interface|APIs]]. All GLUT functions start with the <code>glut</code> prefix (for example, <code>glutPostRedisplay</code> 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 (software)|WGL]]) by [[Nate Robins]]. Additionally, [[macOS]] ships with a GLUT framework that supports its own NSGL/[[Core OpenGL|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 software|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 (software)|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.<ref>{{Cite web|url = https://github.com/markkilgard/glut|title = Glut|website = [[GitHub]]|date = 21 November 2021|access-date = 13 October 2014|archive-date = 11 June 2018|archive-url = https://web.archive.org/web/20180611001101/https://github.com/markkilgard/glut|url-status = live}}</ref> The glut.h header file contains the following license:<ref>{{Cite web|url = https://github.com/markkilgard/glut/blob/master/include/GL/glut.h|title = Glut|website = [[GitHub]]|date = 21 November 2021|access-date = 13 October 2014|archive-date = 3 August 2022|archive-url = https://web.archive.org/web/20220803003718/https://github.com/markkilgard/glut/blob/master/include/GL/glut.h|url-status = live}}</ref> /* 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.[http://www.mathies.com/glfaq/GLToolkitFAQ.html#II] Some [[free software]] or [[Open-source software|open source]] reimplementations also include fixes. Some of the more notable limitations of the original GLUT library include: * The library requires programmers to call <code>glutMainLoop()</code>, a function which never returns. This makes it hard for programmers to integrate GLUT into a program or library which wishes to have control of its own event loop. A common patch to fix this is to introduce a new function, called <code>glutCheckLoop()</code> (macOS) or <code>glutMainLoopEvent()</code> (FreeGLUT/OpenGLUT), which runs only a single iteration of the GLUT event loop. Another common workaround is to run GLUT's event loop in a separate [[thread (computing)|thread]], although this may vary by operating system, and also may introduce [[synchronization (computer science)|synchronization]] issues or other problems: for example, the macOS GLUT implementation requires that <code>glutMainLoop()</code> be run in the main thread. * The fact that <code>glutMainLoop()</code> never returns also means that a GLUT program cannot exit the event loop. [[FreeGLUT]] fixes this by introducing a new function, <code>glutLeaveMainLoop()</code>. * The library terminates the process when the window is closed; for some applications this may not be desired. Thus, many implementations include an extra callback, such as <code>glutWMCloseFunc()</code>. Since it is no longer maintained (essentially replaced by the [[Open-source software|open source]] [[FreeGLUT]]) the above design issues are still not resolved in the original GLUT. == See also == * [[EGL (API)|EGL]] is an interface between [[OpenGL ES]] or [[OpenVG]] and a [[windowing system]]. * [[FreeGLUT]] is intended to be a full replacement for GLUT, and has only a few differences. * [[GLFW]] * [[Simple DirectMedia Layer]] (SDL) * [[OpenGL User Interface Library]] (GLUI) * [[OpenGL Utility Library]] (GLU) == References == {{Reflist}} == External links == * [https://www.opengl.org/resources/libraries/glut/ GLUT - The OpenGL Utility Toolkit] {{Webarchive|url=https://web.archive.org/web/20180118221325/https://www.opengl.org/resources/libraries/glut/ |date=2018-01-18 }} * [https://www.opengl.org/documentation/specs/glut/spec3/spec3.html The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3] (official documentation) * [https://www.opengl.org/resources/libraries/glut/glut_downloads.php The OpenGL Utility Toolkit (GLUT) downloads] (source and pre-compiled libraries) [[Category:OpenGL]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cite web
(
edit
)
Template:Infobox software
(
edit
)
Template:Multiple issues
(
edit
)
Template:Reflist
(
edit
)
Template:Webarchive
(
edit
)
Search
Search
Editing
OpenGL Utility Toolkit
Add topic