daily update on 20231113 by nitload youmu, upgrade gl loader complete
This commit is contained in:
@@ -17,7 +17,7 @@ namespace StgSharp.Graphics
|
||||
_bufferID = new uint[n];
|
||||
fixed (uint* ptr = _bufferID)
|
||||
{
|
||||
GL.gl->GenBuffers(n, ptr);
|
||||
GL.gl.GenBuffers(n, ptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,19 +31,19 @@ namespace StgSharp.Graphics
|
||||
/// </summary>
|
||||
public static void Unbind()
|
||||
{
|
||||
GL.gl->BindBuffer(GLconst.ARRAY_BUFFER, 0);
|
||||
GL.gl.BindBuffer(GLconst.ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
public void Bind(int index)
|
||||
{
|
||||
GL.gl->BindBuffer(GLconst.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.gl.BindBuffer(GLconst.ARRAY_BUFFER, _bufferID[index]);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
fixed (uint* id = _bufferID)
|
||||
{
|
||||
GL.gl->DeleteBuffers(_bufferID.Length, id);
|
||||
GL.gl.DeleteBuffers(_bufferID.Length, id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,14 +55,14 @@ namespace StgSharp.Graphics
|
||||
/// <param name="readType"></param>
|
||||
public void SetData<T>(int index, T bufferData, BufferUsage usage) where T : IMat
|
||||
{
|
||||
GL.gl->BindBuffer((int)BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.gl.BindBuffer((int)BufferType.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferData, usage);
|
||||
|
||||
}
|
||||
|
||||
public void SetDataArray<T>(int index, T[] bufferArray, BufferUsage usage) where T : struct, IConvertible
|
||||
{
|
||||
GL.gl->BindBuffer(GLconst.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.gl.BindBuffer(GLconst.ARRAY_BUFFER, _bufferID[index]);
|
||||
GL.SetBufferData(BufferType.ARRAY_BUFFER, bufferArray, usage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user