Back to project page ExpertAndroid.
The source code is released under:
MIT License
If you think the Android project ExpertAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.iuriio.demos.expertandroid.ch9openglexperiments; /*from w w w . j a va2 s. co m*/ import android.app.Activity; import android.opengl.GLSurfaceView; import android.os.Bundle; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; /** * Created by iuriio on 10/25/13. */ public class OpenGLES10Activity extends Activity { private GLSurfaceView testHarness; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.testHarness = new GLSurfaceView(this); this.testHarness.setEGLConfigChooser(false); // Test 1 // this.testHarness.setRenderer(new SimpleTriangleRenderer(this)); // this.testHarness.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // Test 2 // this.testHarness.setRenderer(new AnimatedSimpleTriangleRenderer(this)); // this.testHarness.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY); // Test 3 this.testHarness.setRenderer(new PolygonRenderer(this)); this.testHarness.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY); this.setContentView(this.testHarness); } @Override protected void onResume() { super.onResume(); this.testHarness.onResume(); } @Override protected void onPause() { super.onPause(); this.testHarness.onPause(); } }