Till KTH:s startsida Till KTH:s startsida

Visa version

Version skapad av Victor Wåhlström 2011-04-04 19:03

Visa nästa >
Jämför nästa >

OpenGL and Visual Studio

The following explains how to get started with Visual Studio 2010 and OpenGL. This is written from memory and may contain errors. If you find any errors, please report them to a TA, and we'll correct it.

  1. Create an empty C++ project in Visual Studio
    • File->New->Project...->Visual C++->General->Empty Project
  2. Locate the project directory where all project files go
    • Usually located under My Documents\Visual Studio 2010\Projects\<project name>\<project name>\
  3. Copy all the code, .dll, and .lib files provided for this assignment to this directory.
  4. Go back to Visual Studio and run the project.
    • If you get compile errors, this is likely because it can't find <GL/glut.h>
    • A quick way to remedy this is to use relative paths ("") instead of include paths (<>). Relative paths are relative to the place where the project files go, so if you copied the files verbatim to the project directory, you can simply replace <GL/glut.h> with "GL/glut.h" in all .h and .cpp files.