daily update on 20240325 by nitload youmu
This commit is contained in:
@@ -38,28 +38,28 @@ namespace StgSharp.Graphics
|
||||
public unsafe class VertexArray : BufferObjectBase
|
||||
{
|
||||
|
||||
internal VertexArray(int n, IglFunc gl)
|
||||
internal VertexArray(int n, Form binding)
|
||||
{
|
||||
GL = gl;
|
||||
_bufferHandle = GL.GenVertexArrays(n);
|
||||
this.binding = binding;
|
||||
_bufferHandle = binding.GL.GenVertexArrays(n);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public override sealed void Bind(int index)
|
||||
{
|
||||
GL.BindVertexArray(_bufferHandle[index]);
|
||||
binding.GL.BindVertexArray(_bufferHandle[index]);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindNull()
|
||||
{
|
||||
GL.BindVertexArray(glHandle.Zero);
|
||||
binding.GL.BindVertexArray(glHandle.Zero);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetVertexAttribute(uint index, int vertexLength, TypeCode dataType, bool isNomalized, uint stride, int pointer)
|
||||
{
|
||||
GL.SetVertexAttribute(
|
||||
binding.GL.SetVertexAttribute(
|
||||
index, vertexLength, dataType,
|
||||
isNomalized,
|
||||
stride, pointer);
|
||||
@@ -69,7 +69,7 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
GL.DeleteVertexArrays(_bufferHandle);
|
||||
binding.GL.DeleteVertexArrays(_bufferHandle);
|
||||
_bufferHandle.Release();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user