Game Development Reference
In-Depth Information
<activity android:name=".NativeGLActivity"
android:label="OpenGL Native">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
The following lines tell Android to create two application launchers in the device launchpad;
one for each of the activities, OpenGL Java and OpenGL Native:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Let's start with the Java-only implementation. Figure 3-7 defines the basic workflow of the
OpenGL application. The figure shows the main activity ( JavaGLActivity ), which creates
the rendering surface ( GLSurfaceView ). The surface creates a renderer ( CubeRenderer ) that
contains a thread ( GLThread ). GLThread in turn contains the loop that invokes the renderer
draw() method that draws the tumbling cubes seen on the device display.
Figure 3-7. Workflow of the Java-only cubes sample
 
Search WWH ::




Custom Search