Code example for GL10

Methods: glDisable, glDisableClientState, glDrawArrays, glEnable, glEnableClientState, glFinish, glPopMatrix, glPushMatrix, glRotatef, glTexCoordPointer

0
     * @param y 
     * @param labelID 
     */ 
    public void draw(GL10 gl, float x, float y, int labelID, float angle) {    	
        checkState(STATE_DRAWING, STATE_DRAWING);
        gl.glPushMatrix();
        float snappedX = (float) Math.floor(x);
        float snappedY = (float) Math.floor(y);
        gl.glTranslatef(snappedX, snappedY, 0.0f);
        gl.glRotatef(angle, 0, 0, 1);
        Label label = mLabels.get(labelID);
        gl.glEnable(GL10.GL_TEXTURE_2D);
 
		gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);		
		gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
		 
		vertexBuffer.position(0);
		gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer); 
		 
		texCoordBuffer.position(0);
		gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texCoordBuffer);
		 
		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
		gl.glFinish();
			 
		gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
		gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
         
		gl.glDisable(GL10.GL_TEXTURE_2D);
//        ((GL11)gl).glTexParameteriv(GL10.GL_TEXTURE_2D, 
//                GL11Ext.GL_TEXTURE_CROP_RECT_OES, label.mCrop, 0); 
//        ((GL11Ext)gl).glDrawTexiOES((int) snappedX, (int) snappedY, 0, 
//                (int) label.width, (int) label.height); 
                 
		 
		 
        gl.glPopMatrix();
    } 
 
    /** 
     * Ends the drawing and restores the OpenGL state. 
     *