OpenGL ES 2 for Android
Android is booming like never before, with millions of devices shipping every day. It’s never been a better time to learn how to create your own 3D games and live wallpaper for Android. You’ll find out all about shaders and the OpenGL pipeline, and discover the power of OpenGL ES 2.0, which is much more feature-rich than its predecessor. If you can program in Java and you have a creative vision that you’d like to share with the world, then this is the book for you.
This book will teach you everything you need to know to create compelling graphics on Android. You’ll learn the basics of OpenGL by building a simple game of air hockey, and along the way, you’ll see how to initialize OpenGL and program the graphics pipeline using shaders. Each lesson builds upon the one before it, as you add colors, shading, 3D projections, touch interaction, and more.
Then, you’ll find out how to turn your idea into a live wallpaper that can run on the home screen. You’ll learn about more advanced effects involving particles, lighting models, and the depth buffer. You’ll understand what to look for when debugging your program, and what to watch out for when deploying to the market.
OpenGL can be somewhat of a dark art to the uninitiated. As you read this book, you’ll learn each new concept from first principles. You won’t just learn about a feature; you’ll also understand how it works, and why it works the way it does. Everything you learn is forward-compatible with the just-released OpenGL ES 3, and you can even apply these techniques to other platforms, such as iOS or HTML5 WebGL.
What You Need
Preferably an Android phone or tablet that supports OpenGL ES 2.
Table of Contents
Chapter 1. Getting Started
Part I: A Simple Game of Air Hockey
Chapter 2. Defining Vertices and Shaders
Chapter 3. Compiling Shaders and Drawing to the Screen
Chapter 4. Adding Color and Shade
Chapter 5. Adjusting to the Screen’s Aspect Ratio
Chapter 6. Entering the Third Dimension
Chapter 7. Adding Detail with Textures
Chapter 8. Building Simple Objects
Chapter 9. Adding Touch Feedback: Interacting with Our Air Hockey Game
Part II: Building a 3D World
Chapter 10. Spicing Things Up with Particles
Chapter 11. Adding a Skybox
Chapter 12. Adding Terrain
Chapter 13. Lighting Up the World
Chapter 14. Creating a Live Wallpaper
Chapter 15. Taking the Next Step
Appendix A1. The Matrix Math Behind the Projections
Appendix A2. Debugging
- Paperback: 325 pages
- Publisher: Pragmatic Bookshelf (June 2013)
- Language: English
- ISBN-10: 1937785343
- ISBN-13: 978-1937785345