Game Development Reference
In-Depth Information
OpenGL ES 3 support was introduced in Android 4.3 and Android NDK r9.
However, all of the examples in this topic are backwards-compatible with
the previous version of this mobile API, OpenGL ES 2.
OpenGL itself is a huge topic which merits a dedicated book. We recommend starting with The
OpenGL Programming Guide , Pearson Publications (the red book).
Unifying the OpenGL 3 core proile and
OpenGL ES 2
Let's implement a thin abstraction layer on top of OpenGL 3 and OpenGL ES 2, to make our
high-level code unaware of the particular GL version that our application runs on. This means
that our game code can be completely unaware whether it runs on a mobile or a desktop
version of OpenGL. Take a look at the following diagram:
High-level API
in our application
OpenGL
(glClear, gIDraw...)
GL 3
GL ES 2
GL ES 3
Graphics drivers (OS-dependant)
Graphics hardware
The part that we are going to implement in this chapter is within the High-level API rectangle.
Getting ready
In Chapter 4 , Organizing a Virtual Filesystem , we created an example 3_AsyncTexture ,
where we learned how to initialize OpenGL ES 2 on Android using Java. Now we use GLView.
java from that example to initialize a rendering context on Android. No EGL from Android NDK
is involved, so our examples will run on Android 2.1 and higher.
 
Search WWH ::




Custom Search