Summary
In this chapter, we made the first steps toward a much bigger project. We started with a simple window, whose only task was to be closed again. This showed us the general usage of GLFW. In the next section, we added OpenGL support, and we also tried to detect support for the Vulkan API. If one of them fails (most probably Vulkan), you could continue with OpenGL and skip Chapter 3. The remaining code in this book will be built independently of the renderer and run with OpenGL and Vulkan as the rendering APIs. After the 3D rendering capabilities, we added the handling of the basic window events. Finally, we added the handling of the keyboard for mouse events, allowing us to build view controls and movement in our virtual 3D world.
With these building blocks, you can now create application windows using only a few lines of code. Additionally, you can retrieve input from the mouse and keyboard and prepare the window to display hardware-accelerated graphics. What is shown inside this window is up to your imagination.
In Chapter 2, we will create a basic OpenGL renderer.