Download glut for Windows here here.
Common instructions for setting up opengl with Visual Studio
Many different sites have posts about this. However, I'm going to give you hints. In Pro versions SDKs are installed by default. If you are using Visual Studio Express you need to install Windows Platform SDK.
Now extract the glut archive you just downloaded from this page. Copy glut.h and paste where GL.h and GLU.h resides.
Now extract the glut archive you just downloaded from this page. Copy glut.h and paste where GL.h and GLU.h resides.
The directory is PlatformSDKInstallDIR\Windows\VERSION\Include\gl
Copy dll file to System 32 folder
Copy lib file to to PlatformSDKInstallDIR\Windows\VERSION\Lib
For Visual Studio 2008 Pro files go like this.
glut.h -> C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\gl
glut32.dll-> C:\Windows\System32
glut32.lib -> C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
Testing OpenGL Code
- Create new win32 -> win32 project.
- Click Solution Explorer. Right click Source Files. Click Add - > New Item. Specify a name. Select .cpp as template.
- Download this code file. Extract and copy the contents of the cpp file and paste on the empty cpp file of the IDE
- Select Project properties additional dependency: opengl32.lib glut32.lib glu32.lib
- To build press Alt + Shft + B. If build is successful press Ctrl + F5 to run the program.
Example of such code here.
Related Links:
Previously compiled Windows Seven version of glut has been removed when a few people reported disruption.
ReplyDelete