7#include <Common/primitive_type.h>
8#include <Utility/Concurrent/TSPSCExecutor.h>
9#include <DataIO/FileSystem/Path.h>
10#include <Utility/Concurrent/TSynchronized.h>
11#include <Utility/Concurrent/TRelaxedAtomic.h>
12#include <Frame/TFrame.h>
13#include <Math/Geometry/TAABB2D.h>
19namespace ph {
class Engine; }
20namespace ph {
class Renderer; }
53 using EngineWork = std::function<void(
void)>;
58 math::TAABB2D<int32> updatedRegion = math::TAABB2D<int32>::makeEmpty();
62 void renderSingleStaticImageOnEngineThread(
RenderConfig config);
69 std::jthread makeStatsRequestThread(Renderer* renderer, uint32 minPeriodMs);
70 std::jthread makePeekFrameThread(Renderer* renderer, uint32 minPeriodMs);
72 TSPSCExecutor<EngineWork> m_engineThread;
73 TRelaxedAtomic<EOfflineRenderStage> m_renderStage;
74 TSynchronized<OfflineRenderStats> m_syncedRenderStats;
75 TSynchronized<OfflineRenderPeek> m_syncedRenderPeek;
77 TSynchronized<FrameData> m_synchedFrameData;
78 std::atomic_flag m_requestCompletedFrameDataUpload;
79 std::atomic_flag m_requestRenderStats;
80 std::atomic_flag m_requestRenderPeek;
85 return m_renderStage.relaxedRead();
90 m_renderStage.relaxedWrite(stage);
Thin wrapper for GHI thread interactions from another thread. Mainly to hide unrelated GHI interface ...
Definition GHIThreadCaller.h:16
Definition RenderConfig.h:13
Definition RenderThreadUpdateContext.h:11
Information about the rendered frame. For frame data exchange between the renderer and outside world.
Definition OfflineRenderPeek.h:18
Information about the rendering process. For gathering general information from the renderer.
Definition OfflineRenderStats.h:27
Definition OfflineRenderer.h:27
bool tryGetRenderPeek(OfflineRenderPeek *peek, bool shouldUpdateInput=false)
Definition OfflineRenderer.cpp:118
bool tryGetRenderStats(OfflineRenderStats *stats)
Make an attempt to retrieve render statistics from the render engine.
Definition OfflineRenderer.cpp:96
OfflineRenderer()
Definition OfflineRenderer.cpp:37
void update(const RenderThreadUpdateContext &ctx) override
Definition OfflineRenderer.cpp:275
void render(RenderConfig config)
Definition OfflineRenderer.cpp:55
void cleanupGHI(GHIThreadCaller &caller) override
Definition OfflineRenderer.cpp:272
EOfflineRenderStage getRenderStage() const
Definition OfflineRenderer.h:83
void createGHICommands(GHIThreadCaller &caller) override
Definition OfflineRenderer.cpp:288
~OfflineRenderer() override
Definition OfflineRenderer.cpp:52
void setupGHI(GHIThreadCaller &caller) override
Definition OfflineRenderer.cpp:269
Definition SceneRenderer.h:11
Definition DesignerObject.h:19
EOfflineRenderStage
Definition OfflineRenderStats.h:13
Definition ph_editor.h:10