Practice1-应用OpenGL ES 设置颜色

Practice1-使用OpenGL ES 设置颜色
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        glView = new GLSurfaceView( this );
        glView.setRenderer( this );

        setContentView( glView );
    }

public void onDrawFrame( GL10 gl ){
    //increase red color
    redColor += 0.01f;
    if( redColor > 1.0f ) redColor = 0.0f;
    gl.glClearColor( redColor, 0.0f, 0.0f, 1.0f );

    gl.glClear(GLES10.GL_COLOR_BUFFER_BIT|GLES10.GL_DEPTH_BUFFER_BIT );
}