Code example for GL10

Methods: glClearglLoadIdentityglTranslatef

0
		gl.glClearColor(1f, 0.0f, 0.0f, 1.0f);	
    } 
 
    public void onDrawFrame(GL10 gl) {
        // Redraw background color 
    	gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
    	gl.glLoadIdentity();
    	gl.glTranslatef(0.0f, 0.0f, -5.0f);
    	logo.draw(gl);
    } 
 
    public void onSurfaceChanged(GL10 gl, int width, int height) {
    	if (height == 0)
		{ 
			height = 1;
		} 
		 
		gl.glViewport(0, 0, width, height);
		gl.glMatrixMode(GL10.GL_PROJECTION);
		gl.glLoadIdentity();
Contextual code suggestions in your IDE  Get Codota for Java