[Internal] Seperate InternalIO into different static classes. [Matrix] Fix logic error of compute model.

This commit is contained in:
Youmu Liu
2025-10-27 19:59:12 +08:00
parent 1c9b820531
commit e1ec761e83
46 changed files with 2572 additions and 2310 deletions
@@ -61,7 +61,7 @@ namespace StgSharp.MVVM.ViewModel
fpsCountingToken.TimeSpanRefreshed += CountFps;
fpsCountingToken.MissTimeSpanRefreshed += CountFps;
if (_nextView != _currentView) {
Interlocked.Exchange(ref _currentView, _nextView);
_ = Interlocked.Exchange(ref _currentView, _nextView);
}
Thread renderThread = new Thread((token) => {
try
@@ -70,7 +70,7 @@ namespace StgSharp.MVVM.ViewModel
}
catch (Exception ex)
{
InternalIO.InternalWriteLog(
DefaultLog.InternalWriteLog(
$"Critical error when rendering:\n" + $"{ex}", LogType.Error);
ShouldClose = true;
throw;
@@ -84,9 +84,9 @@ namespace StgSharp.MVVM.ViewModel
while (_closed)
{
if (_nextView != _currentView) {
Interlocked.Exchange(ref _currentView, _nextView);
_ = Interlocked.Exchange(ref _currentView, _nextView);
}
InternalIO.glfwPollEvents();
GraphicFramework.glfwPollEvents();
eventAwaitingToken.WaitNextSpan();
_closed = !ShouldClose;
}
@@ -115,7 +115,7 @@ namespace StgSharp.MVVM.ViewModel
private unsafe void PrivateShow()
{
if (0 == InternalIO.glfwWindowShouldClose(this.viewPortDisplay.ViewPortHandle))
if (0 == GraphicFramework.glfwWindowShouldClose(this.viewPortDisplay.ViewPortHandle))
{
CurrentView.Use();
RenderStream.PollEvents();