pass 1
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m39s
CI / Windows Release Package (push) Successful in 2m45s

This commit is contained in:
Aiden
2026-05-11 01:12:24 +10:00
parent 53e78890a8
commit c4883d3413
16 changed files with 618 additions and 303 deletions

View File

@@ -31,20 +31,19 @@ OpenGLComposite::OpenGLComposite(HWND hWnd, HDC hDC, HGLRC hRC) :
mScreenshotRequested(false)
{
InitializeCriticalSection(&pMutex);
mRuntimeHost = std::make_unique<RuntimeHost>();
mRuntimeStore = std::make_unique<RuntimeStore>(*mRuntimeHost);
mRuntimeSnapshotProvider = std::make_unique<RuntimeSnapshotProvider>(*mRuntimeHost);
mRuntimeStore = std::make_unique<RuntimeStore>();
mRuntimeSnapshotProvider = std::make_unique<RuntimeSnapshotProvider>(*mRuntimeStore);
mRuntimeCoordinator = std::make_unique<RuntimeCoordinator>(*mRuntimeStore);
mRenderEngine = std::make_unique<RenderEngine>(
*mRuntimeSnapshotProvider,
mRuntimeHost->GetHealthTelemetry(),
mRuntimeStore->GetHealthTelemetry(),
pMutex,
hGLDC,
hGLRC,
[this]() { renderEffect(); },
[this]() { ProcessScreenshotRequest(); },
[this]() { paintGL(false); });
mVideoBackend = std::make_unique<VideoBackend>(*mRenderEngine, mRuntimeHost->GetHealthTelemetry());
mVideoBackend = std::make_unique<VideoBackend>(*mRenderEngine, mRuntimeStore->GetHealthTelemetry());
mShaderBuildQueue = std::make_unique<ShaderBuildQueue>(*mRuntimeSnapshotProvider);
mRuntimeServices = std::make_unique<RuntimeServices>();
}
@@ -247,7 +246,7 @@ bool OpenGLComposite::InitOpenGLState()
mRenderEngine->ResetShaderFeedbackState();
broadcastRuntimeState();
mRuntimeServices->BeginPolling(*mRuntimeStore);
mRuntimeServices->BeginPolling(*mRuntimeCoordinator);
return true;
}
@@ -406,17 +405,18 @@ bool OpenGLComposite::ProcessRuntimePollResults()
if (!mRuntimeServices)
return true;
const RuntimePollEvents events = mRuntimeServices->ConsumePollEvents();
if (events.failed)
bool shaderBuildRequested = false;
std::vector<RuntimeCoordinatorServiceResult> serviceResults;
mRuntimeServices->ConsumeRuntimeCoordinatorResults(serviceResults);
for (const RuntimeCoordinatorServiceResult& serviceResult : serviceResults)
{
ApplyRuntimeCoordinatorResult(mRuntimeCoordinator->HandleRuntimePollFailure(events.error));
return false;
shaderBuildRequested = shaderBuildRequested || serviceResult.result.shaderBuildRequested;
ApplyRuntimeCoordinatorResult(serviceResult.result);
if (serviceResult.failed)
return false;
}
if (events.registryChanged)
broadcastRuntimeState();
if (!events.reloadRequested)
if (!shaderBuildRequested)
{
if (!mShaderBuildQueue || !mRenderEngine)
return true;
@@ -439,7 +439,6 @@ bool OpenGLComposite::ProcessRuntimePollResults()
return true;
}
ApplyRuntimeCoordinatorResult(mRuntimeCoordinator->HandleRuntimeReloadRequest());
return true;
}

View File

@@ -13,7 +13,6 @@
#include "GLExtensions.h"
#include "RuntimeCoordinator.h"
#include "RuntimeHost.h"
#include "RuntimeSnapshotProvider.h"
#include "RuntimeStore.h"
@@ -73,7 +72,6 @@ private:
HGLRC hGLRC;
CRITICAL_SECTION pMutex;
std::unique_ptr<RuntimeHost> mRuntimeHost;
std::unique_ptr<RuntimeStore> mRuntimeStore;
std::unique_ptr<RuntimeCoordinator> mRuntimeCoordinator;
std::unique_ptr<RuntimeSnapshotProvider> mRuntimeSnapshotProvider;