2
Building an OpenGL 4 Renderer
Welcome to Chapter 2! In the previous chapter, you learned how to open an application window, including the OpenGL context, and how to perform a very basic operation: clearing the screen in different colors. More actions were not possible due to the limited OpenGL support included in GLFW.
In this chapter, you will learn how to get access to the OpenGL function calls and extensions using a “loader” helper, which is a small piece of code that maps the OpenGL functions to the entry points of the installed system library. We could also do this mapping in our own code, but this would require a lot of extra work. The OpenGL renderer will be enhanced during the book – as the first step, we will only display a textured quad on the screen, consisting of two triangles.
In this chapter, we will cover the following topics:
- The rendering pipeline of OpenGL 4
- Basic elements of our OpenGL 4 renderer
- Buffer types for the...