How do you install GLUT and OpenGL in Visual Studio 2012?

前端 未结 11 2076
悲哀的现实
悲哀的现实 2020-11-30 20:43

I just installed Visual Studio 2012 today, and I was wondering how can you install GLUT and OpenGL on the platform?

11条回答
  •  遥遥无期
    2020-11-30 21:02

    For an easy and appropriate way of doing this, first download a prepackaged release of freeglut from here. Then read its Readme.txt.

    I copied some important parts of that package here:

    ... Create a folder on your PC which is readable by all users, for example “C:\Program Files\Common Files\MSVC\freeglut\” on a typical Windows system. Copy the “lib\” and “include\” folders from this zip archive to that location ... freeglut DLL can be placed in the same folder as your application...

    ... Open up the project properties, and select “All Configurations” (this is necessary to ensure our changes are applied for both debug and release builds). Open up the “general” section under “C/C++”, and configure the “include\” folder you created above as an “Additional Include Directory”. If you have more than one GLUT package which contains a “glut.h” file, it’s important to ensure that the freeglut include folder appears above all other GLUT include folders ... Open up the “general” section under “Linker”, and configure the “lib\” folder you created above as an “Additional Library Directory”...

提交回复
热议问题