daily update on 20240206 by nitload youmu

This commit is contained in:
Nitload
2024-02-06 13:54:30 +08:00
parent 5d778e0f2f
commit 8548757bbf
114 changed files with 86620 additions and 752 deletions
+20 -14
View File
@@ -21,6 +21,12 @@ namespace StgSharp.Graphics
{
api = context;
}
void IglFunc.SwitchContext()
{
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.ActiveTexture(uint type)
{
@@ -46,7 +52,7 @@ namespace StgSharp.Graphics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void IglFunc.AttachShader(glHandle program, glHandle shader)
{
api->glAttachShader(program[0], shader[0]);
api->glAttachShader(program.value, shader.value);
}
void IglFunc.BindBuffer(BufferType bufferType, uint index)
@@ -132,10 +138,10 @@ namespace StgSharp.Graphics
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe glHandle IglFunc.CreateProgram(int count)
unsafe glHandleSet IglFunc.CreateProgram(int count)
{
glHandle h = new glHandle(count);
uint* p = h.handle;
glHandleSet h = new glHandleSet(count);
glHandle* p = h.handle;
for (int i = 0; i < count; i++)
{
*(p + i) = api->glCreateProgram();
@@ -181,16 +187,16 @@ namespace StgSharp.Graphics
api->glDeleteBuffers(1, &handle);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.DeleteBuffers(glHandle handle)
unsafe void IglFunc.DeleteBuffers(glHandleSet handle)
{
api->glDeleteBuffers((uint)handle.length, handle.handle);
api->glDeleteBuffers((uint)handle.length, (uint*)handle.handle);
handle.Free();
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.DeleteVertexArrays(glHandle arrays)
unsafe void IglFunc.DeleteVertexArrays(glHandleSet arrays)
{
api->glDeleteVertexArrays((uint)arrays.length, arrays.handle);
api->glDeleteVertexArrays((uint)arrays.length, (uint*)arrays.handle);
arrays.Free();
}
@@ -220,20 +226,20 @@ namespace StgSharp.Graphics
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.GenBuffers(uint count, glHandle handle)
unsafe void IglFunc.GenBuffers(uint count, glHandleSet handle)
{
api->glGenBuffers(count, handle.handle);
api->glGenBuffers(count, (uint*)handle.handle);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.GenTextures(uint count, glHandle handle)
unsafe void IglFunc.GenTextures(uint count, glHandleSet handle)
{
api->glGenTextures(count, handle.handle);
api->glGenTextures(count, (uint*)handle.handle);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
unsafe void IglFunc.GenVertexArrays(uint count, glHandle handle)
unsafe void IglFunc.GenVertexArrays(uint count, glHandleSet handle)
{
api->glGenVertexArrays(count, handle.handle);
api->glGenVertexArrays(count, (uint*)handle.handle);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]