private int Add(TextureRegion region, Color color)
{
if (Texture == null)
Texture = region.Texture;
else if (Texture != region.Texture)
throw new ArgumentException("All regions must be from the same texture");
float u = region.U;
float v = region.V2;
float u2 = region.U2;
float v2 = region.V;
_vertices[_index + 0].Color = color;
_vertices[_index + 0].TextureCoordinate = new Vector2(u, v);
_vertices[_index + 1].Color = color;
_vertices[_index + 1].TextureCoordinate = new Vector2(u, v2);
_vertices[_index + 2].Color = color;
_vertices[_index + 2].TextureCoordinate = new Vector2(u2, v2);
_vertices[_index + 3].Color = color;
_vertices[_index + 3].TextureCoordinate = new Vector2(u2, v);
_index += 4;
return _index - 4;
}