Preparing the development environment
Before we create a new console project in Visual Studio, we are first going to download some third-party dependencies for convenience; otherwise we will have to implement the construction of the OpenGL context completely by ourselves, and some important but complex functionality such as image reading and displaying. To make this process less lengthy, we will choose only two external libraries here:
FreeGLUT
FreeImage
Both of them are open source and easy to understand.
External libraries will be used as dependencies for each of our C++ projects, so we can make use of the OpenGL-based drawing and image loading functions, which are important for future work.
FreeGLUT is a complete alternative to the famous OpenGL Utility Toolkit (GLUT), allowing developers to create and manage OpenGL contexts with just a few functions and readable callbacks. Its official website is:
http://freeglut.sourceforge.net/
But, we can directly download the prebuilt Windows package...