Пример #1
0
 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);
 }
Пример #2
0
 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();
 }
Пример #3
0
 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);
 }
Пример #4
0
 public static void Rectangle(Rectangle rect, Texture tex, RectangleD texCoords)
 {
     Rectangle(rect.X, rect.Y, rect.Width, rect.Height, tex, texCoords);
 }
Пример #5
0
 public static void Rectangle(Rectangle rect, RectangleD texCoords)
 {
     Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
 }
Пример #6
0
 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);
 }
Пример #7
0
 public static void Rectangle(Rectangle rect, Texture tex, RectangleD texCoords)
 {
     Rectangle(rect.X, rect.Y, rect.Width, rect.Height, tex, texCoords);
 }
Пример #8
0
 public static void Rectangle(Rectangle rect, RectangleD texCoords)
 {
     Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
 }