Drawing 3D graphics with the OpenGL ES 2.0 API
The previous recipes describe OpenGL ES 1.x on the Android NDK. This recipe covers how to use OpenGL ES 2.0 in Android NDK.
Getting ready
Readers are recommended to read the introduction of this chapter before going through this recipe. A lot of graphic basics are covered in the following recipes; it is suggested that we go through them first:
- Drawing 2D graphics and applying transforms with OpenGL ES 1.x API
- Drawing 3D graphics and lighting up the scene with OpenGL ES 1.x API
How to do it...
The following steps create an Android project that renders a 3D cube with OpenGL ES 2.0 API in Android NDK:
- Create an Android application named
CubeG2
. Set the package name ascookbook.chapter4.cubeg2
. Please refer ...
Get Android Native Development Kit Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.