36 lines
887 B
C#
36 lines
887 B
C#
using Raster3D.Engine;
|
|
using Raster3D.Engine.Impl;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Raster3D.Engine.Graphics;
|
|
using Raster3D.Engine.Objects;
|
|
|
|
namespace Raster3D.App
|
|
{
|
|
internal class Game : CGameLoop
|
|
{
|
|
|
|
|
|
|
|
|
|
public override void exec(Engine.Engine engine)
|
|
{
|
|
Vec2D[] points = new Vec2D[3];
|
|
points[0] = new Vec2D(32, 32);
|
|
points[1] = new Vec2D(64, 32);
|
|
points[2] = new Vec2D(64, 64);
|
|
|
|
rgb[] colors = new rgb[3];
|
|
colors[0] = new rgb(1.0f, 0.0f, 0.0f); // red
|
|
colors[1] = new rgb(0.0f, 1.0f, 0.0f); // green
|
|
colors[2] = new rgb(0.0f, 0.0f, 1.0f); // blue
|
|
|
|
Triangle triangle = new Triangle(points, colors, engine);
|
|
triangle._Draw();
|
|
}
|
|
}
|
|
}
|