You copied the Doc URL to your clipboard.

3.2. Writing an Android NDK sample

You can use the template sample as a base to get started writing OpenGL ES 2.0 applications.

This section describes using C++ OpenGL ES 2.0 and JNI.

To add code to Template:

  1. Open Template.cpp in the jni folder

  2. Add setup code which will be run once at the start in the setupGraphics() method. This performs startup action such as, for example, loading shaders, enabling OpenGL ES states, and loading textures.

  3. Place the code which will draw each frame in the renderFrame() method

Was this page helpful? Yes No