removed fractures of old disposal implementation that is no longer needed.

This commit is contained in:
Harrison Deng 2019-01-26 23:23:16 -06:00
parent d1d9b1ad55
commit 96dbb7df6b

View File

@ -13,7 +13,6 @@ namespace RecrownedAthenaeum.Render
/// The <see cref="PrimitiveBatch"/> used. Needs to be disposed.
/// </summary>
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
/// </summary>
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
/// <param name="rotation">Rotation of rectangle. Default is 0 radians.</param>
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];