diff options
| author | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-09 01:45:40 +0100 |
|---|---|---|
| committer | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-09 01:45:40 +0100 |
| commit | 6fd78657f010bcc48c746a7b1e6ae9a0589adf5b (patch) | |
| tree | 479512c0858e3ddfbcd891a193dfc96530771087 /Unicity.Engine | |
| parent | 3b214e75effaca1ba67daaf29d0a94e5b0129386 (diff) | |
| download | Unicity-6fd78657f010bcc48c746a7b1e6ae9a0589adf5b.tar.gz Unicity-6fd78657f010bcc48c746a7b1e6ae9a0589adf5b.tar.bz2 Unicity-6fd78657f010bcc48c746a7b1e6ae9a0589adf5b.zip | |
Can render triangles now
Diffstat (limited to 'Unicity.Engine')
| -rw-r--r-- | Unicity.Engine/GameWindow.cs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Unicity.Engine/GameWindow.cs b/Unicity.Engine/GameWindow.cs index cb44eb8..7a765ca 100644 --- a/Unicity.Engine/GameWindow.cs +++ b/Unicity.Engine/GameWindow.cs @@ -1,5 +1,6 @@ using System; using Unicity.Renderer; +using Unicity.Renderer.Shapes; namespace Unicity.Engine { @@ -20,20 +21,12 @@ namespace Unicity.Engine window = new RenderWindow(width, height, title); renderer = new GraphicsRenderer(window); - window.Render += Window_Render; - - renderer.TestInit(); - } - - private void Window_Render(object sender, EventArgs e) - { - renderer.TestLoop(); + renderer.SetRenderData(new Shape[] { new Triangle(new float[] { -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f }, 1.0f, 1.0f, 0.0f) }); } public void Open(double ups = 60.0, double fps = 60.0) { window.Open(ups, fps); - renderer.TestInit(); } protected virtual void Dispose(bool disposing) |
