Skip to content

Latest commit



101 lines (68 loc) · 4.09 KB

File metadata and controls

101 lines (68 loc) · 4.09 KB
layout classes author toc toc_sticky title header excerpt sidebar
Abhijeet Singh
Setup OpenGL with Visual Studio 2017 on Windows 10
image teaser
Open Graphics Library is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics.
title image image_alt text
Open Graphics Library
title text
Instructions provided for Windows 10


Open Graphics Library is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit, to achieve hardware-accelerated rendering.


To execute your graphics applications written using OpenGL libraries, you can use Visual Studio.

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs, as well as websites, web apps, web services and mobile apps.

Install Visual Studio Community 2017 using the official installer with the required components as shown in the image below.

{: .align-center}


  1. Download GLUT header, lib, and dll files from OpenGL. (Mentioned on this page)

  2. Paste glut.h in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\{14.16.27023}\include\GL.

    Create the GL folder if not present already. The {version} may differ on your system.

  3. Paste glut.lib in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\{14.16.27023}\lib\x64.

    Paste glut32.lib in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\{14.16.27023}\lib\x86. The {version} may differ on your system.

  4. Paste glut.dll and glut32.dll in C:\Windows\SysWOW64.

    Copy glut32.dll to C:\Windows\System32 also.

  5. Open your Windows Console Application project in Visual Studio, or create a new one:

    File > New > Project
    Visual C++ > Windows Desktop > Windows Console Application

    {: .align-center}

  6. Go to Project > Properties.

    Select All Configuration from Configuration dropdown menu on top left corner.

    Select Configuration Properties > C/C++ > Precompiled headers and change Precompiled Header option's value to Not Using Precompiled Headers.

    Select Configuration Properties > Linker > Input. Now right click on Additional Dependencies found on right panel and click Edit.

    Now type:


    (Note: Each .lib in new line)

  7. That's it. You have successfully installed OpenGL. Go on and run your program.

Same installation instructions apply to freeglut files with the header files in the GL folder, lib in the lib folder, and dll in the System32 folder.

Check your installation

You can check your installation by running a simple C++ OpenGL program to draw points on a 2D canvas.

<script src=""></script>

You'll get the following output:

{: .align-center}


This website is open source. ♥️
Improve this page