bandarra.me

OpenGL

OpenGL

Since i started coding games for Android, I wanted to learn OpenGL. Besides enabling the development of 3D games, OpenGL is supposed to give the app a performance boost on 2D games.

Android has OpenGL ES bindings for OpenGL ES 1.0 and OpenGL ES 2.0 (if you are on Android 2.2+). Since i didn't know much about OpenGL coding, I searched for good books one the subject.

I found OpenGL SuperBible, which covers OpenGL 3.3 Core Profile and a bit about OpenGL ES 2.0 and OpenGL ES 2.0 Programming Guide which covers OpenGL ES 2.0 in depth.

The downside for both books is that none of them cover Android OpenGL coding and both books have code examples in C. So, I decided to break my learning curve into a few parts:

  1. Review my C/C++ knowledge so I can have a better understanding of the books.
  2. Understand OpenGL programming in general (Code and ES) and use this knowledge on Java Programming
  3. Use the OpenGL + Java programming skills on Android.

The starting place for my research was this page on opengl.org, When checking out those links, I found out that a many of them had not been updated for OpenGL 3., or even OpenGL 2.. Java 3D is more than an OpenGL Binding and is more like a SceneGraph API filled with lots of bells and whistles. The real contenders where JOGL and lwjgl. So, I researched both API's in more depath and found that lwjg is leaner than JOGL and gives me access to all the methods I need to implement the code from the OpenGL SuperBible book and would make an easier port to the Android OpenGL API too, which is nothing more than bindings to the OpenGL ES 2 API.

Of course, nothing comes for free. I had to (and I'm still) translating o lot of Math code from the C++ book to Java. My intention is to get some tutorials done and help people who have the same goals!

Stay tuned for updates soon!