Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
RenderThreadCaller.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <utility>
6
7namespace ph::editor::render { class System; }
8
9namespace ph::editor
10{
11
16{
17public:
18 explicit RenderThreadCaller(RenderThread& renderThread);
19
24 template<typename WorkType>
25 inline void add(WorkType&& work)
26 {
27 m_renderThread.addWork(std::forward<WorkType>(work));
28 }
29
30private:
31 RenderThread& m_renderThread;
32};
33
35 : m_renderThread(renderThread)
36{}
37
38}// end namespace ph::editor
Thin wrapper for render thread interactions from another thread. Mainly to hide unrelated render thre...
Definition RenderThreadCaller.h:16
RenderThreadCaller(RenderThread &renderThread)
Definition RenderThreadCaller.h:34
void add(WorkType &&work)
Definition RenderThreadCaller.h:25
Definition RenderThread.h:25
Definition DesignerObject.h:19
Definition ph_editor.h:10