O'Reilly logo

Android NDK Game Development Cookbook by Viktor Latypov, Sergey Kosarevsky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unifying the OpenGL 3 core profile 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:

Unifying the OpenGL 3 core profile and OpenGL ES 2

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required