Skip to content

Getting started – installing freeglut and GLTools

2010 October 1
by Daniel

OpenGL does graphics… only graphics

OpenGL is a cross-platform graphics library, but does not include any features for creating windows, keyboard input, networking, sound or working with graphics files. These features are provided by a number of other libraries, which may be cross platform (such as SDL) or single platform (WGL for Windows), and may include additional features specifically for game development (such as OGRE).

We will start using a relatively simple and small library which provides fewer features than some of the alternatives – but which allows learners to quickly start learning about OpenGL development without having to work with a large or complex API. We will also be using a cross-platform library so that the code and examples should work on Windows, Mac and *nix platforms. (With some exceptions, which will be marked as such)

freeglut

freeglut is a cross-platform and relatively simple library – it is based on the older GLUT library (used in a number of text books, and online tutorials), and is largely code-compatible, with a few extensions. freeglut is available at http://freeglut.sourceforge.net/. You can learn more about the freeglut and access the documentation from here. freeglut is available under the open-source X-consortium (MIT) license. This license allows freeglut to be used in the development of proprietry (i.e. commercial) software.

freeglut do not provide a pre-compiled version of the library for use in your own projects – you need to download freeglut and compile it. This will build the dynamic link library file that you can use to compile your own projects. Some pre-packaged versions are provided by third parties, and are linked to from the freeglut download page – and the libaries are also included in the GLTools library downloads to accompany the OpenGL SuperBible.

Installing freeglut and GLTools for windows

As a conveniece to users running windows, precompiled GLTools & freeglut library files (with headers) can be downloaded from here. Save the zip file to disc, then extract the files, noting the location of the new folder. (Update October 2011: If you only need the freeglut files, precompiled win32 binaries (including lib, dll and header files) for freeglut 2.4.0 are available here: http://bit.ly/freeglut )

Ideally you should save these files to a folder in your home drive, and then configure Visual Studio to add the files to projects where required. Instructions for how to do this in Visual Studio 2008 can be found in the OpenGL SuperBible, 5th Edition. For Visual Studio 2010, instructions can be found here:

Setting Up Freeglut and GLTools Libraries – Visual Studio 2010

One Response leave one →

Trackbacks and Pingbacks

  1. » Open Education: My Year Learning Games

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS