Rendering 2D images with texture mapping
Now that we have introduced the basics of GLSL using a simple example, we will incorporate further complexity to provide a complete framework that enables users to modify any part of the rendering pipeline in the future.
The code in this framework is divided into smaller modules to handle the shader programs (
shader.hpp), texture mapping (
texture.hpp), and user inputs (
controls.hpp). First, we will reuse the mechanism to load shader programs in OpenGL introduced previously and incorporate new shader programs for our purpose. Next, we will introduce the steps required for texture mapping. Finally, we will describe the main program, which integrates all the logical ...