mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
38 lines
728 B
C#
38 lines
728 B
C#
using System;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.Client.Graphics
|
|
{
|
|
/// <summary>
|
|
/// Represents a mutable texture that can be modified and deleted.
|
|
/// </summary>
|
|
public abstract class OwnedTexture : Texture, IDisposable
|
|
{
|
|
protected OwnedTexture(Vector2i size) : base(size)
|
|
{
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Dispose(true);
|
|
GC.SuppressFinalize(this);
|
|
}
|
|
|
|
[Obsolete("Use Dispose() instead")]
|
|
public void Delete()
|
|
{
|
|
Dispose();
|
|
}
|
|
|
|
protected virtual void Dispose(bool disposing)
|
|
{
|
|
|
|
}
|
|
|
|
~OwnedTexture()
|
|
{
|
|
Dispose(false);
|
|
}
|
|
}
|
|
}
|