Specifying Texture Data

In this section, we describe the method in which image data is loaded into texture objects. Two methods are covered—first, we show how to load images directly into the texture object either from data stored in arrays in your program or from buffer objects. This illustrates the storage and data formats used for texture objects. Next, we show how to use the vglLoadImage() function that is supplied as part of the sample code for this book and how it allows you to load images from files.

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.