Code example for GLSurfaceView

Methods: setDebugFlags, setEGLContextClientVersion, setRenderer

0
            return; 
        } 
 
        // We don't use Layout. But you can. 
        // create an OpenGLView 
        mGLSurfaceView = new GLSurfaceView(this);
        mGLSurfaceView.setDebugFlags(GLSurfaceView.DEBUG_CHECK_GL_ERROR);
        mGLSurfaceView.setEGLContextClientVersion(2);
        mGLSurfaceView.setRenderer(new GLES20Renderer(this));
        setContentView(mGLSurfaceView);
 
        mHandler = new Handler();
 
        if (SystemInformation.isSuAvailable(this)) {
            String contain = SystemInformation.canGainSuFor(this, "cat /proc/vmallocinfo");
        } 
 
    } 
 
    @Override 
    protected void onResume() {