Pro OpenGL ES for iOS

(singke) #1

CHAPTER 6: Will It Blend? (^183)
Figure 6-8. On the left, only the textures are displayed. In the center, they’re blended with color, and for the one
on the right they’re solid red.
You can also add translucency to textures quite easily. To enable this, I’ll introduce a
small simplifying factor here. You can colorize the textured face by using a single color
by simply using glColor4f() and eliminate the need to create the vertex color array.
Setting the alpha to less than 1.0 results in the see-through texture, as shown in
Figure 6-9.

Free download pdf