jchitel
jchitel

Reputation: 3169

How to setup NupenGL and include it in a Visual Studio project

I need to setup Visual Studio with OpenGL for a class. I found a site that explains how to install the NupenGL package through NuGet to get the OpenGL libraries and headers. I follow the instructions and see that everything gets installed to a packages/ folder in my solution folder, but absolutely nothing happens to my project that allows those files to be included.

What do I have to do to include the libraries and headers from the NupenGL package into my project so that it can build OpenGL code?

Upvotes: 0

Views: 3750

Answers (1)

itmuckel
itmuckel

Reputation: 1420

Be sure that nupengl.core and nupengl.core.redist are listed in your packages.config (look for it in your Project-Explorer on the right). In your project folder there should be also two nupengl folders inside the "packages" directory.

Then type #include "GL in your .cpp file. Intellisense should then show you the path of the GL directory inside your nupengl directory as a tooltip. So just type

#include "GL\freeglut.h"

or

#include "GL\glut.h"

to use OpenGL-Functions in your code.

Upvotes: 5

Related Questions