daily update on 20240104 by nitload youmu, double threading not work
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user