Code example for GL10

Methods: glBindTexture, glDisableClientState, glDrawElements, glEnableClientState, glFrontFace, glTexCoordPointer, glVertexPointer

0
         * 
         * @param gl - The GL Context 
         */ 
        public void draw(GL10 gl) {
            //Bind our only previously generated texture in this case 
            gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
 
            //Point to our buffers 
            gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
            gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
 
            //Set the face rotation 
            gl.glFrontFace(GL10.GL_CCW);
 
            //Enable the vertex and texture state 
            gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
            gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
 
            //Draw the vertices as triangles, based on the Index Buffer information 
            gl.glDrawElements(GL10.GL_TRIANGLES, indices.length, GL10.GL_UNSIGNED_BYTE, indexBuffer);
 
            //Disable the client state before leaving 
            gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
            gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
        } 
 
        /** 
         * Load the textures 
         *