Win32: Setting up OpenGL's GLUT

it's been a very long time since my previous posts. i had to recently install opengl on my windows xp environment, and found there were actually very little documentation on this subject. so here's a tutorial to getting things started in opengl & glut.

CHECK FOR OpenGL:

1. when you install visual studios, you should already have the following libraries and DLLs:
- OpenGL32.lib (in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib, etc)
- GLU32.lib (in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib, etc)
2. make sure you see the following dll's in C:\Windows\System32
- OpenGL32.dll
- GLU32.dll

BUILD & INSTALL GLUT:

1. goto http://www.opengl.org/resources/libraries/glut/glut_downloads.php
- i downloaded 3.7.6 from http://www.xmission.com/~nate/glut.html
- download glut-3.7.6-src.zip
2. unzip glut-3.7.6/ directory onto the desktop
3. open glut.dsw
4. build the glut32 project

if you have visual studios 6, you should be fine. however, if you have visual studio 9.0 like me, you'll end up with an error during file copy, so you have to do some manual copying and pasting...

1. inside the [[DESKTOP]]/glut-3.7.6/ directory navigate to:
- [[DESKTOP]]/glut-3.7.6/lib/glut/Debug
2. copy glut32.dll into C:\Windows\System32
3. Copy glut32.lib into C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
4. Copy [[DESKTOP]]/glut-3.7.6/include/GL/glut.h to C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\glut.h

after this you should be able to start compiling the samples from the OpenGL red book.

No comments: