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];