Code example for GL10

Methods: glFrustumfglLoadIdentityglMatrixModeglViewport

0
    /** 
     * Handle change of size. 
     */ 
    @Override 
    public void sizeChanged(GL10 gl, int w, int h) {
        gl.glViewport(0, 0, w, h);
        gl.glMatrixMode(GL10.GL_PROJECTION);
        gl.glLoadIdentity();
        float ratio = (float) w / h;
        gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7);
    } 
 
    /** 
     * Create some big objects that we want 
     * around only when we're drawing. 
     */ 
    @Override 
    public void surfaceCreated(GL10 gl) {
        // set up the surface 
        gl.glDisable(GL10.GL_DITHER);
Connect your IDE to all the code out there  Get Codota for Java