Graphics Programs Reference
In-Depth Information
Creating the OpenGL Surface
Once you create a new Android application ( Figure 1-14 ) , open the
file. Replace the contents of this file with the code given in Listing 1-3 . Table 1-1
gives the description of lines in this code.
Figure 1-14 . Creating new Android application for OpenGL surface view application
Listing 1-3. GL SURFACE/src/com/apress/android/glsurface/
public class Main extends Activity {
private GLSurfaceView _surfaceView;
public void onCreate(Bundle savedInstanceState) {
_surfaceView = new GLSurfaceView(this);
_surfaceView.setRenderer(new GLES20Renderer());
Search WWH ::

Custom Search