VOOZH about

URL: https://www.geeksforgeeks.org/installation-guide/how-to-setup-opengl-with-visual-studio-2019-on-windows-10/

⇱ How to setup OpenGL with Visual Studio 2019 on Windows 10? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to setup OpenGL with Visual Studio 2019 on Windows 10?

Last Updated : 15 Jul, 2022

OpenGL is a 2D and 3D graphics API that provides a cross-platform application programming interface for a wide variety of computer platforms. It is operating system independent and has a transparent network. Application developers use it to develop high-performing and visually compelling graphics software applications.

Prerequisites:

Installation:

Now let's jump into the setup of OpenGL. To do so follow the below steps:

Step 1: First we have to download Visual Studio 2019 for windows10. 

Step 2: Now we have installed Visual Studio2019 from its downloaded the .exe file with Windows installer.

👁 Image

Select Visual Stdio community 2019 and click Modify, now select  the required components as shown in below image and click install while Downloading :

👁 Image

It will take some time after it will be complete  restart the computer after the installation take place.

Step 3:

  • Now download GLUT header file, the .LIB, and .DLL files all pre-compiled for Intel platforms, you can simply download the glutdlls37beta.zip file from the website.
  • File inside folder look like this:

👁 Image

Step 4: After this, we have to copy the file as instructed below:

  • First, paste glut.h file in:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\include\gl
  • Then paste glut.lib in:
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\lib\x64
  • Then paste the glut32.lib in:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\lib\x86
  • Then paste glut.dll and glut32.dll in:
 C:\Windows\SysWOW64
  • Finally  copy glut32.dll to:
C:\Windows\System32 

Take a look at the below video for installation:

Here is one sample code for running to check whether it is working or not

Output:

👁 Image

Comment