OpenGL itself does not provide GUI operations, but there are many open source libraries that provide support. While learning OpenGL, I chose the Freeglut Library on window as a helper for GUI operations. Here's a look at the setup of OpenGL and Freeglut environments under Visual Studio.
1. Download Freeglut
Download Link: http://freeglut.sourceforge.net/index.php#download
2. After downloading and extracting, get three folders
bin//DLL Dynamic Library
Include//. h header File
LIB//. lib Static library
3. Open visual Studio and create a new project, then configure the environment
The first step is to open the properties configuration:
The second step is to add the header file:
Third step, add Lib:
Fourth step, add the entry:
Fifth step, setting the console output
Sixth step, add DLL dynamic library
Method 1: Copy the Freeglut.dll library to the project directory, and the EXE file generated by the project is in the same directory. This approach is only valid for the current project and is required for each project.
Method 2: Copy the Freeglut.dll library to the C:\Windows\System32 directory (for 32-bit libraries), or C:\Windows\System directory (for 64-bit)
In this context, the configuration is complete. Also: the library used by the OpenGL learning process is based on 32-bit, so the above configuration is a library that chooses 32.
OpenGL Learning Environment Construction under window