Code example for FloatBuffer

Methods: flip, put

0
		vertices = bytes.asFloatBuffer();
	} 
	 
	public FloatBuffer setDims(int bottomY, int leftX, int rightX, int topY)
	{ 
		vertices.put( new float[]{
				leftX, bottomY,
				rightX, bottomY,
				(rightX - leftX) / 2, topY
		}); 
		vertices.flip();
		return vertices;
	} 
	 
	public void move(int x, int y)
	{ 
		float[]old = vertices.array();
		vertices.clear();
		vertices.put( new float[]{
				old[0] + x, old[1] + y,
				old[2] + x, old[3] + y,