3. Textures

The examples in Chapter 2, “Making the Hardware Work for You,” demonstrate how to render and display a white triangle with OpenGL ES 2.0. Real-life objects are seldom composed solely of white or any other solid color. OpenGL ES provides a way to specify different colors for every vertex in your geometry, but in practice, even triangles with multi-color vertices don’t provide a sense of realism in rendered scenes. This chapter introduces a graphics technique called texturing that controls the color of every pixel in a rendered triangle.

Texturing is one of the most complex topics in computer graphics. This chapter introduces the concepts that underlay texturing and explains the commonly used options. Several examples progressively ...

Get Learning OpenGL ES for iOS: A Hands-On Guide to Modern 3D Graphics Programming 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.