daily update on 20240305 by nitload youmu

This commit is contained in:
YoumuLiu
2024-03-05 10:17:02 +08:00
parent 1f2fca4c8f
commit 6a0cccae79
156 changed files with 23040 additions and 1385 deletions
+19 -4
View File
@@ -2,6 +2,7 @@
using StgSharp.Controlling;
using StgSharp.Logic;
using StgSharp.Math;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -272,7 +273,7 @@ namespace StgSharp.Graphics
else
{
M128 m = default;
m.UInt64[0] = (ulong)windowID;
m.Write<ulong>(0, (ulong)windowID);
GLonUpdate glu = gl as GLonUpdate;
glu.frameworkHandleEnqueue(
(IntPtr)(delegate*<void>)&InternalSwapBuffer, m);
@@ -405,13 +406,27 @@ namespace StgSharp.Graphics
ConcurrentQueue<IntPtr> glActions = (gl as GLonUpdate).GLactionQueue;
#pragma warning restore CS8602
IntPtr currentOperation;
while (gl.GetWindowShouldClose(this))
TimeSpan span = new TimeSpan(100L);
try
{
if (glActions.TryDequeue(out currentOperation))
while (gl.GetWindowShouldClose(this))
{
((delegate*<void>)currentOperation)();
if (glActions.TryDequeue(out currentOperation))
{
((delegate*<void>)currentOperation)();
}
else
{
Thread.Sleep(span);
}
}
}
catch (Exception e)
{
this.ShouldClose = true;
(gl as GLonUpdate).ShowDequeueStream();
throw;
}
}
#endregion form main