OpenGL Resources

Updated on Jan 6  2018


OpenGL,FreeGlut,VS

Deborah R. Fowler



Using OpenGL in Visual Studio with Freeglut

Posted Oct 7  2015
Update Feb 12  2017
Update June 26  2019
Update Sept 28  2025 tested in VS2022

USE VS 2022 Community https://visualstudio.microsoft.com/downloads/

Download for older versions should you need them for dev https://visualstudio.microsoft.com/vs/older-downloads/
Notes about VS 2017 are included in the collapsed section below for convenience.

TIP: since VISUAL STUDIO 2017 – you must select to install C++ support. VS 2022 this is still true.
Be sure to match version of what we are using for file compatibility. Installing is easy!
NOTE: In VS2019 there is no longer a need to include "pch.h" - yeah! If you find code with "pch.h" or "stdafx.h" those are from older versions of VS that required these - no longer needed.

Using OpenGL you must do the following in Visual Studio 2022. (same procedure since 2017)

Steps are:

1. Tools/NuGet Package Manager/ Manage NuGet Packages for Solution
2. Click on Browse and search for nupengl.core (warning - do not use the nuopengl.core.redist)
3. Select it, select checkbox for project and install
MISSING
          IMAGE
NOTE: If you are using an older sample file that included references in project properties you may need to remove them from lib. No action required other than the above if this is a new project.



TIP: VISUAL STUDIO 2015 – do not use the default install, you must select custom to install C++ support (you can go back and add it if you forgot – I did as I thought it would be out of the box … same is true in VS 2022

http://blogs.msdn.com/b/vcblog/archive/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers.aspx

NOTE: Microsoft changed their install procedures for VS 2015 sometime after October 2015 to the community versions.

Now the "install" of freeglut is thru NuGetPackageManager
If this method is used, do NOT have the lib file included in the properties. (If you are using an older file that included them you may need to remove them)

Steps are: (tested in VS2022 09/28/2025)
1. Tools/NuGet Package Manager/ Manage NuGet Packages for Solution
2. Click on Browse and search for nupengl.core (warning - do not use the nuopengl.core.redist)
3. Select it, select checkbox for project and install

MISSING IMAGE

ARCHIVED INFORMATION BELOW FOR non-windows 10

Please note, on Windows 7, Community version vs_community_EDU.exe does not work, download the iso and burn to disc (right click and select Windows Disk Image Burner, then burn), then run off disk to install ... however the professional version does work without iso/burn. UPDATE JAN 7/2017 - VS 2015 Community works on Windows 7 and installs with vs_community_EDU_758833255.1483585560.exe.

I note that since October, the default install of both the above littered my Program Files (x86) with files rather than neatly putting all into the Microsoft Visual Studio XX subdirectory. UPDATE JAN 7/2017 - clean install on Windows 7, to be tested on Windows 10.

A trial pro version for SCAD only existed but I have had license issues at home - community recommended instead (do not use the MSDN resources, use Microsoft site and download vs_professional_ENU.exe (this one does work on Windows 7 and higher).https://www.visualstudio.com/post-download-vs?sku=pro&clcid=0x409

NOTE: VS 2015 has python support:
http://blogs.msdn.com/b/visualstudio/archive/2015/08/03/why-write-python-in-visual-studio.aspx

TIP: VS2015 has a character limit of 248 characters for directory/filenames


THESE ARE NOTES FOR VS 2010 and are archived here:

If you do not have freeglut already installed:


If you have freeglut already installed do the following

Inside Visual Studios 2010 go to