added dispose to texture batch
This commit is contained in:
parent
8f327f30e3
commit
54ea6905a2
@ -1,18 +0,0 @@
|
||||
using System;
|
||||
namespace RecrownedGTK.Graphics.Render {
|
||||
public class Batch {
|
||||
private bool begun;
|
||||
public Batch() {
|
||||
//TODO: Finish this class.
|
||||
}
|
||||
public void Begin() {
|
||||
if (begun) throw new InvalidOperationException("This batch has already been started.");
|
||||
begun = true;
|
||||
}
|
||||
|
||||
public void End() {
|
||||
if (!begun) throw new InvalidOperationException("The batch has not begun.");
|
||||
begun = false;
|
||||
}
|
||||
}
|
||||
}
|
34
RecrownedGTK/Graphics/Render/TextureBatch.cs
Normal file
34
RecrownedGTK/Graphics/Render/TextureBatch.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
namespace RecrownedGTK.Graphics.Render {
|
||||
public class TextureBatch : IDisposable {
|
||||
private bool disposed;
|
||||
private bool begun;
|
||||
public TextureBatch() {
|
||||
//TODO: Finish this class.
|
||||
}
|
||||
public void Begin() {
|
||||
if (begun) throw new InvalidOperationException("This TextureBatch has already been started.");
|
||||
begun = true;
|
||||
}
|
||||
|
||||
public void End() {
|
||||
if (!begun) throw new InvalidOperationException("The TextureBatch has not begun.");
|
||||
begun = false;
|
||||
}
|
||||
protected virtual void Dispose(bool disposing) {
|
||||
if (disposed) return;
|
||||
if (disposing) {
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
~TextureBatch() {
|
||||
Dispose(false);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user