Game Development Reference
In-Depth Information
Initialize the EGL context.
Create the GL surface.
Swap buffers (perform the actual drawing).
CubeRenderer : This is an implementation of the Renderer interface to draw the
cubes.
Cube : This class encapsulates a GL cube, including vertices, colors, and indices for
each face.
Because the sample needs to be slightly modified to illustrate the concepts of the chapter, the
following classes have been added for this purpose:
JavaGLActivity : This is the Android activity that will start the Java-only version of
the application.
NativeGLActivity : This activity will start the hybrid version of the sample (with
Java/C/JNI code).
Natives : This class defines the native methods used by this sample.
Figure 5-2. Resource list for the OpenGL sample
The Android manifest needs to be updated to include the new activities defined in the previous
paragraph, as shown in bold in Listing 5-1.
Search WWH ::




Custom Search