Code example for ShortBuffer

Methods: capacity

0
		gl.glNormalPointer(GL10.GL_FLOAT, 0, mNormalBuffer);
//		gl.glColor4f(0f, 0f, 1f, 1f); 
 
		// Draw the vertices as triangle strip 
//		gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 3); 
		gl.glDrawElements(GL10.GL_TRIANGLES, mIndexBuffer.capacity(), GL10.GL_UNSIGNED_SHORT, mIndexBuffer);
		gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
		gl.glDisableClientState(GL10.GL_NORMAL_ARRAY);
 
		int error = gl.glGetError();
		if (error != GL10.GL_NO_ERROR) {
			Log.d("GLError", "OpenGL Error: " + error);
		} 
	} 
 
	/** 
	 * Gets the vertex buffer. 
	 *  
	 * @return the vertex buffer 
	 */ 
	public FloatBuffer getVertexBuffer() {