Sunday 21 August 2011

OpenGL installation Instructions


OpenGL installation


WINDOWS
Install your favorite integrated development environment (IDE). This tutorial assumes that you
have Microsoft Visual Studio installed on your machine.
1. Install OpenGL
OpenGL software runtime is included as part of operating system. So you only need to
download this if you think your copy is somehow missing. The OpenGL libraries are also
available as the self-extracting archive file from the Microsoft.
OpenGL libraries and header files are
• opengl32.lib
• glu32.lib
• gl.h
• glu.h
2. Install GLUT
If you do not have GLUT installed on your machine you can download it from:
http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
GLUT Libraries and header files are
• glut32.lib
• glut.h
3. Use OpenGL & GLUT in your source code
Use the three header files (gl.h, glu.h and glut.h) in your source code. Please check the
path of your project to see if these files are found by your compiler.
4. Change project settings
In Visual C/C++ and .NET you'll have to do the following in order to link an application
using GLUT:
• Select Project/Settings.
• Go to linker settings.
• Add the following files to the Object/library modules:
opengl32.lib, glut32.lib, glu32.lib.
5. Changes in code
Use the include file <windows.h> in your source code.



LINUX
1. Install OpenGL
OpenGL and GLX and the X server integration of GLX, are Linux system components,
and should be part of the Linux system you use.
2. Install GLUT
Download glut source from
http://www.opengl.org/resources/libraries/glut/glut_downloads.php
and follow the instructions in the package
Files to be included
#include <GL/glut.h> // Header File For The GLUT Library
#include <GL/gl.h> // Header File For The OpenGL32 Library
#include <GL/glu.h> // Header File For The GLu32 Library
3. Linker settings in Makefile
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm