OpenGL ES 2.0 and More

So far, you've seen only half of OpenGL ES, so to speak. We used OpenGL ES 1.0 exclusively, because it is the most widely-supported version on Android at this point. Its fixed-function nature lends itself well to getting into 3D graphics programming. However, there's a newer, shinier version of OpenGL ES that enables you to code directly on the GPU. It's very different from what you have seen in this book in that you are responsible for all the nitty-gritty details, such as fetching a single texel from a texture or manually transforming the coordinates of a vertex, all directly on the GPU.

OpenGL ES 2.0 has a so-called “shader-based,” or programmable, pipeline as opposed to the fixed-function pipeline of OpenGL ES 1.0 and 1.1. For many 3D (and 2D) games, OpenGL ES 1.x is more than sufficient. If you want to get fancy, though, you might want to consider checking out OpenGL ES 2.0! Don't be afraid—all the concepts you learned in this book are easily transferable to the programmable pipeline.

There is a Google-supported library for Android called RenderScript, which is a high-level interface for building flashy OpenGL ES 2.0–based effects without all of the pain of implementing them using its tedious API. Don't get us wrong—OpenGL ES 2.0 is great, and we have plenty of experience with it—but RenderScript certainly provides an easier way of creating many graphics effects, and it is at the heart of many of the default Live Wallpapers which ship with stock versions of Android.

We also haven't touched on topics such as animated 3D models and some more-advanced OpenGL ES 1.x concepts such as vertex buffer objects. As with OpenGL ES 2.0, you can find many resources on the Web, as well as in book form. You know the basics. Now it's time to learn even more!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset