daily update on 20240209 by nitload youmu
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user