Code example for GLSurfaceView

Methods: setOnTouchListener, setRenderer

0
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
 
        mGLView = new GLSurfaceView(this);
        Touch touch = new Touch();
        mGLView.setRenderer(new CubeGLRenderer(touch));
        mGLView.setOnTouchListener(touch);
        setContentView(mGLView);
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        mGLView.onPause();
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume();