Code example for GL10

Methods: glClearColor, glClearDepthf, glDepthFunc, glEnable, glHint

0
        this.context = context;
        this.parent = parent;
    } 
 
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
        gl.glClearDepthf(1.0f);
        gl.glEnable(GL10.GL_DEPTH_TEST);
        gl.glDepthFunc(GL10.GL_LEQUAL);
        gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
    } 
 
    /** 
     * Tell the renderer that a touch action is ready for processing. 
     * If another touch event is still pending processing, it will be replaced 
     * @param event The action that needs to be processed. 
     */ 
    public void handleTouch(MotionEvent event) {
        touchEvent = event;
        touchHandled = false;
    }