Tuesday, April 15, 2008

Glut and Freeglut

GLUT which is short form for OpenGL Utility Tool is a library of utilities for OpenGL programs, which primarily perform system-level I/O with the host operating system. Functions include window definition, window control, and monitoring of keyboard and mouse input. GLUT even has some limited support for creating pop-up menus.
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.

There are three more notable limitations of
GLUT library.

  1. The library requires programmers to call glutmainloop(); 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.
  2. The fact that glutmainloop() never returns also means that a GLUT program cannot exit the event loop.
  3. The library terminates the process when the window is closed; for some applications this may not be desired.

Freeglut is an open source alternative to the
GLUT library. Freeglut is created to improve the toolkit and hence replacing the GLUT. It only has a few differences about Freeglut and GLUT.

Freeglut fixes the glutmainloop() bug by introducing a new function called glutleavemainloop().

Some other more bugs are also fix in
Freeglut, and people now use Freeglut instead of GLUT as it fixes almost all the bugs in GLUT thus Freeglut is now distributed instead of GLUT.


1 comment:

Low said...

Your blog has not been updated to comment on week 4 and week 5.


You also need to post the link to your work so that it can be downloaded.