Code example for GLSurfaceView

Methods: setRenderer

0
public class TriangleActivity extends Activity {
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mGLView = new GLSurfaceView(this);
        mGLView.setRenderer(new StaticTriangleRenderer(this));
        /*ImageView imageView = new ImageView(this); 
        imageView.setImageResource(R.raw.robot); 
        setContentView(imageView);*/ 
        setContentView(mGLView);
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        mGLView.onPause();
    } 
 
    @Override 
    protected void onResume() {