Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
OpenGL Utility Toolkit
(section)
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!
== 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)