daily update on 20240213 by nitload youmu. 逐步弃用GLFW,正在使用wgl重写glfw底层,相关实现转移到C#实现,SSC彻底变成线性代数计算器。
This commit is contained in:
@@ -57,14 +57,14 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glBindBuffer(m.UInt32[0], *(uint*)m.IntPtr1);
|
||||
paramQueue.context->glBindBuffer(m.UInt32[0], *(uint*)m.UInt64[1]);
|
||||
}
|
||||
|
||||
private static void InternalBindTexture()
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glBindTexture(m.UInt32[0], *(uint*)m.IntPtr1);
|
||||
paramQueue.context->glBindTexture(m.UInt32[0], *(uint*)m.UInt64[1]);
|
||||
}
|
||||
|
||||
private static void InternalBindVertexArray()
|
||||
@@ -101,10 +101,10 @@ namespace StgSharp.Graphics
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
paramQueue.TryDequeue(out shaderHandle, out codeHandle);
|
||||
*(uint*)shaderHandle = InternalIO.InternalLoadShaderCode((byte*)codeHandle, type);
|
||||
*(uint*)shaderHandle = InternalIO.InternalLoadShaderCode(paramQueue.context, (byte*)codeHandle, type);
|
||||
if (*(uint*)shaderHandle == 0)
|
||||
{
|
||||
IntPtr logPtr = InternalIO.InternalReadLog();
|
||||
IntPtr logPtr = InternalIO.InternalReadSSCLog();
|
||||
string log;
|
||||
try
|
||||
{
|
||||
@@ -146,13 +146,13 @@ namespace StgSharp.Graphics
|
||||
|
||||
private static void InternalCreateProgramSet()
|
||||
{
|
||||
IntPtr programHandle;
|
||||
uint* programHandle;
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
programHandle = m.IntPtr0;
|
||||
programHandle = (uint*)m.UInt64[0];
|
||||
for (int i = 0; i < m.Int32[2]; i++)
|
||||
{
|
||||
*((uint*)programHandle + i) = paramQueue.context->glCreateProgram();
|
||||
*(programHandle + i) = paramQueue.context->glCreateProgram();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,14 +160,14 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glDeleteBuffers(m.UInt32[2], (uint*)m.IntPtr0);
|
||||
paramQueue.context->glDeleteBuffers(m.UInt32[2], (uint*)m.UInt64[0]);
|
||||
}
|
||||
|
||||
private static void InternalDeleteVertexArrays()
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glDeleteVertexArrays((uint)m.Int32[0], (uint*)m.IntPtr1);
|
||||
paramQueue.context->glDeleteVertexArrays((uint)m.Int32[0], (uint*)m.UInt64[0]);
|
||||
}
|
||||
|
||||
private static void InternalDrawElements()
|
||||
@@ -183,21 +183,21 @@ namespace StgSharp.Graphics
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glGenBuffers(m.UInt32[2], (uint*)m.IntPtr0);
|
||||
paramQueue.context->glGenBuffers(m.UInt32[2], (uint*)m.UInt64[0]);
|
||||
}
|
||||
|
||||
private static void InternalGenTextures()
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glGenTextures(m.UInt32[2], (uint*)m.IntPtr0);
|
||||
paramQueue.context->glGenTextures(m.UInt32[2], (uint*)m.UInt64[0]);
|
||||
}
|
||||
|
||||
private static void InternalGenVertexArrays()
|
||||
{
|
||||
M128 m = default;
|
||||
paramQueue.TryDequeue(out m);
|
||||
paramQueue.context->glGenVertexArrays(m.UInt32[2], (uint*)m.IntPtr0);
|
||||
paramQueue.context->glGenVertexArrays(m.UInt32[2], (uint*)m.UInt64[0]);
|
||||
}
|
||||
|
||||
private static void InternalGetUniformLocation()
|
||||
|
||||
Reference in New Issue
Block a user