Create Project
Create am empty visual C++ project in Visual Studio(Get Visual Studio).
Add GLFW
To write a game engine, we start with the window at first.
OpenGL doesn’t concern about the management of windows and inputs. Therefor we use GLFW to deal with it.
GLFW is an Open Source, multi-platform library for OpenGL, which provides a simple API for creating window and receiving input.
Following the steps to setup GLFW library.
add dependencies
Create a “Dependencies” directory in the root folder of the project.
Download GLFW and put the library in “Dependencies”.
include
Add the include directory in the property.
library
Add the library directory in the property.
Main function
Create a main.cpp
in the root directory.
|
Run it to see if the GLFW works as we expect.
If it succeed, we can implement our first window.
|
Now you should see a window.
In the next chapter we are going to include the OpenGL Extension Wrangler Library and draw our first triangle.