Pro OpenGL ES for iOS

(singke) #1

CHAPTER 1: Computer Graphics: From Then to Now (^31)
Now to compare things, Figure 1-13 shows the pipeline for OpenGL ES 2. Somewhat
simpler in design, but it can be considerably more cumbersome to code for.
OpenGL application Geometry and texture
Vertex data Vertex Shader
Rasterizer
“Hey, that’s even cooler!”
Fragment
Framebuffer
Eyeballs
Fragment Shader
Depth and Blending
Per-fragment operations
Figure 1-13. Basic overview of the OpenGL ES 2.x pipeline
When this is done, and all the rasters have been rasterized, the vertices shaded, and the
colors blended, you might actually see something that looks like that teapot shown in
Figure 1-14.
Note The more you delve into computer graphics, the more you’ll see a little teapot popping
up here and there in examples in books all the way to television and movies (The Simpsons,
Toy Story). The legend of the teapot, sometimes called the Utah Teapot (everything can be
traced back to Utah), began with a PhD student named Martin Newell in 1975. He needed a
challenging shape but one that was otherwise a common object for his doctoral work. His wife
suggested their white teapot, at which point Newell laboriously digitized it by hand. When he
released the data into the public domain, it quickly achieved the status of being the “Hello
World!” of graphics programming. Even one of the early OpenGL ES examples from Apple’s
developer web site had a teapot demo. The original teapot now resides at the Computer History
Museum in Mountain View, California, just a few blocks from Google. See the upper left image
of Figure 1-14.

Free download pdf