Setting up openGl on windows


This is for Visual Studio 2010, although this will apply for almost any version of Visual Studio.
  1. You will need to download the glut library from here http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip
  2. If you are using Windows 7, add glut.dll to C:\Windows\sysWOW64.
  3. If you are using Windows XP, add glut.dll to C:\Windows\system
  4. Add glut.h to C:\Program files(x86)\Visual Studio 10.0\VC\include\gl
    You might need to make a gl folder if one doesn’t exist.
  5. Add glut.lib to  C:\Program Files(x86)\Visual Studio 10.0\VC\lib
  6. Now create a simple visual c++ console application
  7. Right click on solution name where it appears on the right hand side of the screen
  8. Click properties and in the configuration list, select all configurations
  9. Click on linker and in the additional dependencies list add the following: glut.lib
  10. Now create a code file for the project by pressing ctrl+shift+a and select a c++ file
  11. #include gl.h,glu.h and glut.h
  12. And before all these includes, #include<windows.h>
  13. Write any code you want.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s