Texture Data Layout

So far, our descriptions of the texture image specification commands have not addressed the physical layout of image data in memory. In many cases, image data is laid out left-to-right, top-to-bottom9 in memory with texels closely following each other. However, this is not always the case, and so OpenGL provides several controls that allow you to describe how the data is laid out in your application.

9. It’s important to understand that textures don’t really have a top and a bottom, but rather they have an origin and a direction of increasing of texture coordinates. What appears to be rendered at the top of a frame in window coordinates depends entirely on the texture coordinates used.

These parameters are set using the

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.