VS2015 + openGL configuration
Steps for installing GLUT in Windows:
1, In C:\Program Files (x86)\ WindowKits \10\Include\10.0.10586.0\um\ GL or C:\Program Files (x86)\ WindowKits \8.1\Include\um\ GL there are GL.H and GLU.H;

The freeglut. J h, freeglut_ext. J h, freeglut_std. J h, glew. J h, glfw3. J h, glfw3native. J h, glut. J h, glxew. J h, wglew. J h, GLU. H and gl. H in C: \ Program Files \ Windows (x86) Kits 10 \ \ Include \ 10.0.10586.0 \ um \ gl or C: \ Program Files (x86) Kits \ Windows \ \ Include \ 8.1 um \ gl.
2, carry freeglut decompressed. Lib, glew32. Lib, glfw3dll. Lib, glu32. Lib, in the folder (C: \ Program Files \ Windows (x86) Kits 10 \ lib \ \ 10.0.10586.0 and, um, x86″
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\ UM \x64).
There were glu32.lib and opengl32.lib

3, carry freeglut decompressed. DLL, glew32. DLL, glfw3. The DLL into the operating system directory under the system32 folder. (Location: C:\Windows\System32)
If it is a 64-bit operating System, copy it to C:\Windows\System

Two VC engineering configuration:
1) Create a Win32 Console Application.


2) Link to OpenGL libraries. Right click on Project — property,
The Settings are as follows:



I’m going to put FreeGlut.Lib first; glew32.lib; glfw3dll.lib;
Add semicolons between libraries; Or the enter key
3) Modify the code as follows:
#include “stdafx.h”
// opg1.cpp : Defines the entry point for the console application.
//
#include “stdafx.h”
# include “stdafx. H”
# include & lt; GL/glew.h>
# include & lt; GL/glut.h>
# include & lt; math.h>
void display(void)
{
GlClear (GL_COLOR_BUFFER_BIT); /* Clear all pixels */
GlColor3f (1.0, 1.0, 1.0);
GlBegin (GL_POLYGON);// the draw white polygon
GlVertex3f (0.25, 0.25, 0.0);
GlVertex3f (0.75, 0.25, 0.0);
GlVertex3f (0.75, 0.75, 0.0);
GlVertex3f (0.25, 0.75, 0.0);
GlEnd ();
GlFlush (); /* Start processing buffered OpenGL routines */
}
void init (void)
{
GlclearColor (0.0, 0.0, 0.0, 0.0, 0.0); /* select clearing color */
GlMatrixMode (GL_PROJECTION);
GlLoadIdentity ();
GlOrtho (0.0, 1.0, 0.0, 1.0, -1.0, 1.0); /* Initialize viewing values */
}
int main(int argc, char** argv)
{
GlutInit (& amp; argc, argv);
GlutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
GlutInitWindowSize (250, 250); /*Declare initial window size.*/
GlutInitWindowPosition (100, 100); /*Declare initial window position.*/
GlutCreateWindow (” hello “); /*Open window with “hello”in its title bar.*/
The init (); /*Call initialization routines.*/
GlutDisplayFunc (display); /*Register callback function to display graphics.*/
GlutMainLoop (); /*Enter main loop and process events.*/
Return 0; /* ANSI C requires main to return int. */
}
The compile run displays a white rectangle

Steps for installing GLUT in Windows:
1, In C:\Program Files (x86)\ WindowKits \10\Include\10.0.10586.0\um\ GL or C:\Program Files (x86)\ WindowKits \8.1\Include\um\ GL there are GL.H and GLU.H;

The freeglut. J h, freeglut_ext. J h, freeglut_std. J h, glew. J h, glfw3. J h, glfw3native. J h, glut. J h, glxew. J h, wglew. J h, GLU. H and gl. H in C: \ Program Files \ Windows (x86) Kits 10 \ \ Include \ 10.0.10586.0 \ um \ gl or C: \ Program Files (x86) Kits \ Windows \ \ Include \ 8.1 um \ gl.

2, carry freeglut decompressed. Lib, glew32. Lib, glfw3dll. Lib, glu32. Lib, in the folder (C: \ Program Files \ Windows (x86) Kits 10 \ lib \ \ 10.0.10586.0 and, um, x86″
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\ UM \x64).
There were glu32.lib and opengl32.lib

3, carry freeglut decompressed. DLL, glew32. DLL, glfw3. The DLL into the operating system directory under the system32 folder. (Location: C:\Windows\System32)
If it is a 64-bit operating System, copy it to C:\Windows\System

Two VC engineering configuration:
1) Create a Win32 Console Application.


2) Link to OpenGL libraries. Right click on Project — property,
The Settings are as follows:



I’m going to put FreeGlut.Lib first; glew32.lib; glfw3dll.lib;
Add semicolons between libraries; Or the enter key
3) Modify the code as follows:
#include “stdafx.h”
// opg1.cpp : Defines the entry point for the console application.
//
#include “stdafx.h”
# include “stdafx. H”
# include & lt; GL/glew.h>
# include & lt; GL/glut.h>
# include & lt; math.h>
void display(void)
{
GlClear (GL_COLOR_BUFFER_BIT); /* Clear all pixels */
GlColor3f (1.0, 1.0, 1.0);
GlBegin (GL_POLYGON);// the draw white polygon
GlVertex3f (0.25, 0.25, 0.0);
GlVertex3f (0.75, 0.25, 0.0);
GlVertex3f (0.75, 0.75, 0.0);
GlVertex3f (0.25, 0.75, 0.0);
GlEnd ();
GlFlush (); /* Start processing buffered OpenGL routines */
}
void init (void)
{
GlclearColor (0.0, 0.0, 0.0, 0.0, 0.0); /* select clearing color */
GlMatrixMode (GL_PROJECTION);
GlLoadIdentity ();
GlOrtho (0.0, 1.0, 0.0, 1.0, -1.0, 1.0); /* Initialize viewing values */
}
int main(int argc, char** argv)
{
GlutInit (& amp; argc, argv);
GlutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
GlutInitWindowSize (250, 250); /*Declare initial window size.*/
GlutInitWindowPosition (100, 100); /*Declare initial window position.*/
GlutCreateWindow (” hello “); /*Open window with “hello”in its title bar.*/
The init (); /*Call initialization routines.*/
GlutDisplayFunc (display); /*Register callback function to display graphics.*/
GlutMainLoop (); /*Enter main loop and process events.*/
Return 0; /* ANSI C requires main to return int. */
}
The compile run displays a white rectangle

Read More:
- Vc2010 configuring OpenGL environment
- Configuring OpenGL in Visual Studio 2015
- Configuring OpenGL development environment in win10 + vs2015 (including the method of installing 32-bit and 64 bit libraries)
- Solution to the problem that OpenGL can’t find glew32.dll in vs2019
- |-OpenGL – | some small problems about the glut Library
- The simplest course of configuring OpenGL in vs2015
- A series of problems in configuring OpenGL development environment in vs2015
- Vs2015 OpenGL environment configuration
- The first day of OpenGL [vs2017 + OpenGL environment configuration]
- Vs compiling OpenGL project, the solution of unable to open the source file “GL / glaux. H” appears
- Vs2017 installing OpenGL
- Configuring OpenGL in Chinese version of VS2010 and problem solving
- Configuring OpenGL in VS
- OpenGL class library and environment configuration under win10 and vs2015
- (64 bit) OpenGL configuration + vs2017 + glew + glfw
- Using glut in CodeBlocks
- Simple configuration of glfw + glad in vs2015 OpenGL development environment
- OpenGL programming error analysis
- Vs2015 configuring OpenGL (glfw, glew)
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad