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 www . java 2s . co m*/ import android.app.Activity; import android.opengl.GLSurfaceView; import android.os.Bundle; /** * Created by iuriio on 10/27/13. */ public class OpenGLES20Activity extends Activity { private GLSurfaceView surfaceView; ES20ControlledAnimatedTexturedCubeRenderer renderer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.renderer = new ES20ControlledAnimatedTexturedCubeRenderer(this); this.surfaceView = new GLSurfaceView(this); this.surfaceView.setEGLContextClientVersion(2); this.surfaceView.setRenderer(this.renderer); this.surfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY); this.setContentView(this.surfaceView); } @Override protected void onResume() { super.onResume(); this.surfaceView.onResume(); this.renderer.start(); } @Override protected void onPause() { super.onPause(); this.surfaceView.onPause(); this.renderer.stop(); } }