daily update on 20240325 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-25 09:26:53 +08:00
parent 9a10ec201c
commit 02be081eee
142 changed files with 11277 additions and 572 deletions
+7 -7
View File
@@ -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();
}
}