CSC 471 – Intro to Computer Graphics

Instructions for starting a OpenGL/GLUT application using Visual Studio .net

 

Start Visual Studio

Under the file menu

select New Project

In the “New Project Window”

            Select “Visual C++ Projects” on the left hand side

            Select “Win32 console project” on the right hand side

            Choose and name and location for your new project

            *Important in the ‘Win32 Application Wizard’ Window

                        Select the Application Settings

                                    Click “Empty Project”

 

Once the project is open

            Right click on the “Source Files” folder (on the right)

                        Select “Add”

                                    Select “Add New Item”

                                                Select “C++ file”

                                                            Name the file whatever you’d like

 

Now you need to set up the Include and Library paths to point Visual Studio to the relevant GLUT files

 

Right click on your project (on the right hand side) or pull down the Project menu

            Select “Properties”

                        Select the “C/C++” properties

                                    Select “General”

                                                Add the following line to “Additional Include Directories”

                                                            “C:/glut-3.7/include”

                        Select the “Linker” properties

                                    Select “General”

                                                Add the following line to “Additional Library Directories”

                                                            “C:/glut-3.7”

 

Be sure to include the appropriate header files in your source document, ie

#include <GL/glut.h>

 

 

(To build and run your project you have various options – I like to just hit “F5” as this

will build and run your program in a single key stroke, but feel free to explore the menu

options)