The first place to start for OpenGL documentation on the various mobile platforms is straight at the source:
- Google’s Android documentation has a small amount of info about OpenGL, though not too much. You’ll get an overview of the APIs and learn how to exclude your application from unsupported devices. According to the OpenGL Dashboard, most devices out there now support OpenGL ES 2.0.
- Apple’s OpenGL documentation is much better and goes into a lot more depth and detail. At their OpenGL ES for iOS website, you can learn more about best practices and the specifics of using OpenGL on their platform, and they also have videos and sample projects to download.
It’s also worth checking out what the various GPU vendors have to say about best practices and guidelines:
- NVIDIA had a guide on optimizing OpenGL ES 2.0 performance for Tegra. With this guide, you’ll learn how to make your OpenGL code go faster, as well as some of the pitfalls to avoid. Much of the advice given here also makes a lot of sense on other GPUs, and can be measured against other techniques to see what works better.
- Imagination Technologies also has a set of OpenGL ES 2.0 recommendations and an architecture guide tailored for the POWERVR SGX line of GPUs, and a performance recommendations document that seems to be a bit more recent. This line of GPUs is used on Apple’s recent iPhones and iPads, and they can also be found on many Android devices as well.
- For the Mali GPU, ARM also has the OpenGL ES Application Development Guide, and they also have the GPU Application Optimization Guide which covers a specific set of recommendations to follow.
Each GPU vendor also often provides their own SDKs, tools, and IDEs for developing on their GPUs, which can help a great deal with tracing and finding performance issues.
Hope this helps out on your journey ahead!
About the book
Android is booming like never before, with millions of devices shipping every day. In OpenGL ES 2 for Android: A Quick-Start Guide, you’ll learn 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.
It’s never been a better time to learn how to create your own 3D games and live wallpapers. 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.
Hi, kevin
I am currently reading your book. I just wan to know what is the purpose of w. You havent explained it well from your book aside from the use of perspective divide. I search this w component and found out that w should either have 1 or 0 as a value. Now im quite confuse because your book put more than 1 value on w component?
Hi Skadush,
A detailed explanation would be too long to fit in a comment.
The basic purpose behind the W value is to create the 3D perspective, and it does this by dividing X, Y, and Z by W. Normally you never need to worry about the W value because your perspective projection matrix takes care of this for you. In the book where we experiment with the W values, this is when we’re not using a projection matrix, and it’s to see the effects of different W values and what they do. In real-world use, we’ll be using the projection matrix which calculates the W values for us.
The math behind this gets complex, and I wouldn’t recommend trying to digest it without developing a more advanced understanding of OpenGL in general. Don’t worry about this too much for now — just use a perspective projection, and set W to 1 in any vertices that you multiply with that projection.
Thank you for replying.. I will keep reading your book
thanks again.. Do you also have some books for libgdx? or xna? or direct x?
Hi Skadush,
I don’t have any specific recommendations for those; however, “Beginning Android Games” is by one of the creators of libgdx and you may find it useful and helpful. You can purchase it and support the authors with this link: http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430246774/ref=sr_1_1?ie=UTF8&qid=1354915776