daily update on 20240209 by nitload youmu

This commit is contained in:
Nitload
2024-02-09 23:31:33 +08:00
parent 6fe6b3b3cf
commit 8391569482
159 changed files with 948 additions and 2431 deletions
+4 -5
View File
@@ -12,16 +12,15 @@ namespace StgSharp.Graphics
public unsafe class VertexBuffer : IBufferObject
{
internal VertexBuffer(uint n, IglFunc glFunc)
internal VertexBuffer(int n, IglFunc glFunc)
{
_bufferHandle = new glHandle((int)n);
GL = glFunc;
GL.GenBuffers(n, _bufferHandle);
_bufferHandle = GL.GenBuffers(n);
}
public sealed override void Bind(int index)
{
GL.BindBuffer(BufferType.ARRAY_BUFFER, (uint)index);
GL.BindBuffer(BufferType.ARRAY_BUFFER, _bufferHandle[index]);
}
/// <summary>
@@ -57,7 +56,7 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Unbind()
{
GL.BindBuffer(BufferType.ARRAY_BUFFER, 0);
GL.BindBuffer(BufferType.ARRAY_BUFFER, glHandle.Zero);
}
internal void ChangeEnvironment(IglFunc gl)
{