As I had many problems setting Visual Studio 2008 for using OpenGL I will ask this question that can be useful to some people:
Which are the steps to follow in order to use OpenGL with C++ in Visual Studio 2008?
First of all you need to have a video card and check that it works with OpenGL and the drivers are updated. I used the test in this link to check it.
It is also important to check that Visual Studio 2008 is correctly installed and that the following path is created in your computer:
C:\Program Files\Microsoft SDKs\Windows\v6.0A
Now we can follow the installation steps:
1.- Download GLUT from https://www.opengl.org/resources/libraries/glut/glut_downloads.php, unzip and copy the files as instructed below:
2.- Create an empty C++ Win32 application:
3.- Add a new C++ source file:
4.- Link to the OpenGL libraries (important step):
5.- Download this sample code.
6.- It is also necessary to set the paths in Visual Studio:
In Tools -> Options -> VC++ Directories -> Include Files:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
In Configuration Properties → Linker → Additional Library Directories:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With