TerrainInfo(Terrain terrain) { Terrain = terrain; Rectangle = new RectangleD((int)Terrain % 4 / 4.0 + 0.0002, (int)Terrain / 4 / 4.0 + 0.0002, 1 / 4.0 - 0.0004, 1 / 4.0 - 0.0004); }
public static void Rectangle(int x, int y, int width, int height, RectangleD texCoords) { GL.Begin(BeginMode.Quads); GL.TexCoord2(texCoords.Left, texCoords.Top); GL.Vertex2(x, y); GL.TexCoord2(texCoords.Right, texCoords.Top); GL.Vertex2(x + width, y); GL.TexCoord2(texCoords.Right, texCoords.Bottom); GL.Vertex2(x + width, y + height); GL.TexCoord2(texCoords.Left, texCoords.Bottom); GL.Vertex2(x, y + height); GL.End(); }
public static void Rectangle(int x, int y, int width, int height, Texture tex, RectangleD texCoords) { Display.Texture = tex; Rectangle(x, y, width, height, texCoords); }
public static void Rectangle(Rectangle rect, Texture tex, RectangleD texCoords) { Rectangle(rect.X, rect.Y, rect.Width, rect.Height, tex, texCoords); }
public static void Rectangle(Rectangle rect, RectangleD texCoords) { Rectangle(rect.X, rect.Y, rect.Width, rect.Height); }
public static void Rectangle(int x, int y, int width, int height, Texture tex, RectangleD texCoords) { Display.Texture = tex; Rectangle(x, y, width, height, texCoords); }
public static void Rectangle(Rectangle rect, Texture tex, RectangleD texCoords) { Rectangle(rect.X, rect.Y, rect.Width, rect.Height, tex, texCoords); }
public static void Rectangle(Rectangle rect, RectangleD texCoords) { Rectangle(rect.X, rect.Y, rect.Width, rect.Height); }