From 96dbb7df6b25b5f5135dd0b2367f6026504884bf Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sat, 26 Jan 2019 23:23:16 -0600 Subject: [PATCH] removed fractures of old disposal implementation that is no longer needed. --- RecrownedAthenaeum/Render/RectangleRenderer.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/RecrownedAthenaeum/Render/RectangleRenderer.cs b/RecrownedAthenaeum/Render/RectangleRenderer.cs index 8a746c5..c3655e2 100644 --- a/RecrownedAthenaeum/Render/RectangleRenderer.cs +++ b/RecrownedAthenaeum/Render/RectangleRenderer.cs @@ -13,7 +13,6 @@ namespace RecrownedAthenaeum.Render /// The used. Needs to be disposed. /// public readonly PrimitiveBatch primitiveBatch; - private bool disposed; private bool began; private bool filling; @@ -33,7 +32,6 @@ namespace RecrownedAthenaeum.Render public void Begin(bool filled) { filling = filled; - if (disposed) throw new ObjectDisposedException(GetType().Name); if (began) throw new InvalidOperationException("Cannot begin twice."); primitiveBatch.Begin(filled ? PrimitiveType.TriangleStrip : PrimitiveType.LineStrip); began = true; @@ -44,7 +42,6 @@ namespace RecrownedAthenaeum.Render /// public void End() { - if (disposed) throw new ObjectDisposedException(GetType().Name); if (!began) throw new InvalidOperationException("Cannot end before beginning."); primitiveBatch.End(); began = false; @@ -62,7 +59,6 @@ namespace RecrownedAthenaeum.Render /// Rotation of rectangle. Default is 0 radians. public void DrawRectangle(int x, int y, int width, int height, Color color, double rotation = 0) { - if (disposed) throw new ObjectDisposedException(GetType().Name); if (!began) throw new InvalidOperationException("Renderer must be started by calling Begin."); Vector2[] corners = new Vector2[4];