December 2011
Beginner
693 pages
19h 56m
English
When we told you that OpenGL ES was a big, nasty triangle-rendering machine, we were not being 100 percent honest; in fact, OpenGL ES can also render points and lines. Best of all, these are also defined via vertices, and thus, all of the above also applies to them (texturing, per-vertex colors, and so forth). All we need to do to render these primitives is use something other than GL10.GL_TRIANGLES when we call glDrawArrays()/glDrawElements(). We can also perform indexed rendering with these primitives, although that's a bit redundant (in the case of points at least). Figure 7–18 shows a list of all the primitive types OpenGL ES offers.
Figure 7–18. All the primitives OpenGL ES can render ...
Read now
Unlock full access