| |||
| Home > Building and Running the Samples > Writing an Android SDK sample | |||
You can use the Mali SDK Template sample as a base for writing your own OpenGL ES 2.0 applications.
This section describes using OpenGL ES 2.0 directly from Java.
To add code to Mali SDK Template sample:
Open GLES20Renderer.java in the src folder
Add setup code which will be run once at the start
in the onSurfaceCreated() method. This performs
startup action such as, for example, loading shaders, enabling OpenGL
ES states, and loading textures.
Place the code which will draw each frame in the onDrawFrame() method