diff options
| author | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-09 02:44:29 +0100 |
|---|---|---|
| committer | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-09 02:44:29 +0100 |
| commit | 573eb0dc44da073462e24f15a253a51a4013ee58 (patch) | |
| tree | 2866ef331702e36a0d4be6cb53c3799106ca4a85 /Unicity.Engine | |
| parent | 6fd78657f010bcc48c746a7b1e6ae9a0589adf5b (diff) | |
| download | Unicity-573eb0dc44da073462e24f15a253a51a4013ee58.tar.gz Unicity-573eb0dc44da073462e24f15a253a51a4013ee58.tar.bz2 Unicity-573eb0dc44da073462e24f15a253a51a4013ee58.zip | |
Added support for colored triangles
Diffstat (limited to 'Unicity.Engine')
| -rw-r--r-- | Unicity.Engine/GameWindow.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Unicity.Engine/GameWindow.cs b/Unicity.Engine/GameWindow.cs index 7a765ca..1d1559b 100644 --- a/Unicity.Engine/GameWindow.cs +++ b/Unicity.Engine/GameWindow.cs @@ -21,7 +21,7 @@ namespace Unicity.Engine window = new RenderWindow(width, height, title); renderer = new GraphicsRenderer(window); - 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) }); + renderer.SetRenderData(new Shape[] { new Triangle(new float[] { -1.0f, -0.5f, 0.0f, 0.0f, -0.5f, 0.0f, -0.5f, 0.5f, 0.0f }, 1.0f, 0.0f, 0.0f), new Triangle(new float[] { 0.0f, -0.5f, 0.0f, 1.0f, -0.5f, 0.0f, 0.5f, 0.5f, 0.0f }, 1.0f, 1.0f, 0.0f) }); } public void Open(double ups = 60.0, double fps = 60.0) @@ -42,6 +42,7 @@ namespace Unicity.Engine } // Dispose of unmanaged resources + renderer?.Dispose(); window?.Dispose(); disposed = true; |
