daily update on 20240213 by nitload youmu. 逐步弃用GLFW,正在使用wgl重写glfw底层,相关实现转移到C#实现,SSC彻底变成线性代数计算器。

This commit is contained in:
Nitload
2024-02-13 23:42:22 +08:00
parent 8391569482
commit a2241a5a58
307 changed files with 16701 additions and 10296 deletions
+37 -10
View File
@@ -58,9 +58,19 @@ namespace StgSharp.Logic
m.UInt32[1] = u1;
m.UInt32[2] = u2;
paramQueue.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2)
{
M128 m = default;
m.Single[0] = f0;
m.Single[1] = f1;
m.Single[2] = f2;
paramQueue.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2, float f3)
{
@@ -76,8 +86,8 @@ namespace StgSharp.Logic
public void Enqueue(IntPtr p0, IntPtr p1)
{
M128 m = default;
m.IntPtr0 = p0;
m.IntPtr1 = p1;
m.UInt64[0] = (ulong)p0;
m.UInt64[1] = (ulong)p1;
paramQueue.Enqueue(m);
}
@@ -85,7 +95,7 @@ namespace StgSharp.Logic
public void Enqueue(IntPtr p)
{
M128 m = default;
m.IntPtr0 = p;
m.UInt64[0] = (ulong)p;
paramQueue.Enqueue(m);
}
@@ -93,7 +103,7 @@ namespace StgSharp.Logic
public void Enqueue(glHandle handle)
{
M128 m = default;
m.IntPtr0 = (IntPtr)handle.valuePtr;
m.UInt64[0] = (ulong)handle.valuePtr;
paramQueue.Enqueue(m);
}
@@ -101,8 +111,8 @@ namespace StgSharp.Logic
public void Enqueue(glHandle handle, glHandle handle1)
{
M128 m = default;
m.IntPtr0 = (IntPtr)handle.valuePtr;
m.IntPtr1 = (IntPtr)handle1.valuePtr;
m.UInt64[0] = (ulong)handle.valuePtr;
m.UInt64[1] = (ulong)handle1.valuePtr;
paramQueue.Enqueue(m);
}
@@ -235,7 +245,7 @@ namespace StgSharp.Logic
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
p = ret.IntPtr0;
p = (IntPtr)ret.UInt64[0];
}
else
{
@@ -251,8 +261,8 @@ namespace StgSharp.Logic
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
p0 = ret.IntPtr0;
p1 = ret.IntPtr1;
p0 = (IntPtr)ret.UInt64[0];
p1 = (IntPtr)ret.UInt64[1];
}
else
{
@@ -279,6 +289,23 @@ namespace StgSharp.Logic
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out float f0, out float f1, out float f2)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
f0 = ret.UInt32[0];
f1 = ret.UInt32[1];
f2 = ret.UInt32[2];
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out uint u0)
{