From 3b641dd07a00857820c75707cb5639bee67a797f Mon Sep 17 00:00:00 2001 From: Aiden <68633820+awils27@users.noreply.github.com> Date: Mon, 11 May 2026 17:07:45 +1000 Subject: [PATCH] render thread --- .../gl/OpenGLComposite.cpp | 10 ++++++++++ .../gl/OpenGLComposite.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp b/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp index 030a0bf..d81b427 100644 --- a/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp @@ -294,6 +294,12 @@ void OpenGLComposite::renderEffect() if (mRuntimeUpdateController) mRuntimeUpdateController->ProcessRuntimeWork(); + const RenderFrameInput frameInput = BuildRenderFrameInput(); + RenderFrame(frameInput); +} + +RenderFrameInput OpenGLComposite::BuildRenderFrameInput() const +{ RenderFrameInput frameInput; frameInput.useCommittedLayerStates = mRuntimeCoordinator && mRuntimeCoordinator->UseCommittedLayerStates(); frameInput.hasInputSource = mVideoBackend->HasInputSource(); @@ -305,7 +311,11 @@ void OpenGLComposite::renderEffect() frameInput.inputPixelFormat = mVideoBackend->InputPixelFormat(); frameInput.historyCap = mRuntimeStore ? mRuntimeStore->GetConfiguredMaxTemporalHistoryFrames() : 0; frameInput.oscSmoothing = mRuntimeStore ? mRuntimeStore->GetConfiguredOscSmoothing() : 0.0; + return frameInput; +} +void OpenGLComposite::RenderFrame(const RenderFrameInput& frameInput) +{ RenderFrameState frameState; if (mRuntimeServices) { diff --git a/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.h b/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.h index 7bd86b8..474fba5 100644 --- a/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.h +++ b/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.h @@ -12,6 +12,7 @@ #include #include "GLExtensions.h" +#include "RenderFrameState.h" #include #include @@ -87,6 +88,8 @@ private: bool InitOpenGLState(); void renderEffect(); + RenderFrameInput BuildRenderFrameInput() const; + void RenderFrame(const RenderFrameInput& frameInput); void ProcessScreenshotRequest(); std::filesystem::path BuildScreenshotPath() const; };