daily update on 20240104 by nitload youmu, double threading not work

This commit is contained in:
Nitload
2024-01-04 08:58:12 +08:00
parent 14eaab455f
commit 2767c91293
138 changed files with 9692 additions and 11011 deletions
@@ -9,9 +9,38 @@ namespace StgSharp.Graphics
/// <summary>
/// Interface of all kinds OpenGL buffer onjects
/// </summary>
public interface IBufferObject
public abstract class IBufferObject : IDisposable
{
uint this[int index] { get; }
void Bind(int index);
protected uint[] _bufferID;
protected IglFunc GL;
/// <summary>
/// Get the only handle to one of the Object instance
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public uint this[int index]
{
get { return _bufferID[index]; }
}
/// <summary>
/// Bind a buffer instance to OpenGL
/// </summary>
/// <param name="index">Index of handle of the object in this instance to be bind</param>
public abstract void Bind(int index);
protected abstract void Dispose(bool disposing);
~IBufferObject()
{
Dispose(disposing: false);
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
}
}