Chapter 4. Rendering 2D Images and Videos with Texture Mapping
In this chapter, we will cover the following topics:
- Getting started with modern OpenGL (3.2 or higher)
- Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Windows
- Setting up the GLEW, GLM, SOIL, and OpenCV libraries in Mac OS X/Linux
- Creating your first vertex and fragment shader using GLSL
- Rendering 2D images with texture mapping
- Real-time video rendering with filters
Introduction
In this chapter, we will introduce OpenGL techniques to visualize another important class of datasets: those involving images or videos. Such datasets are commonly encountered in many fields, including medical imaging applications. To enable the rendering of images, we will discuss fundamental OpenGL concepts for texture mapping and transition to more advanced techniques that require newer versions of OpenGL (OpenGL 3.2 or higher). To simplify our tasks, we will also employ several additional libraries, including OpenGL Extension Wrangler...