11#include <Common/assertion.h>
12#include <Utility/TUniquePtrVector.h>
13#include <Utility/INoCopyAndMove.h>
14#include <Utility/TSortedVector.h>
15#include <Utility/TFunction.h>
21namespace ph {
class Path; }
23namespace ph::editor {
class RenderThreadUpdateContext; }
33class Scene final :
private INoCopyAndMove
37 explicit Scene(std::string debugName);
54 void addResource(std::unique_ptr<ISceneResource> resource);
72 std::string m_debugName;
74 template<
typename Content, CWeakHandle Handle>
80 std::vector<TFunction<void(
GHIThreadCaller& caller)>> m_pendingCleanups;
82 struct DynamicResourceOrderer
90 TUniquePtrVector<ISceneResource> m_resources;
91 std::vector<ISceneResource*> m_resourcesPendingDestroy;
92 TSortedVector<IDynamicSceneResource*, DynamicResourceOrderer> m_dynamicResources;
Thin wrapper for GHI thread interactions from another thread. Mainly to hide unrelated GHI interface ...
Definition GHIThreadCaller.h:16
Definition RenderThreadUpdateContext.h:11
A general item pool.
Definition TItemPool.h:41
Definition ghi_infos.h:101
Definition IDynamicSceneResource.h:20
virtual EProcessOrder getProcessOrder() const
Definition IDynamicSceneResource.h:39
Definition ISceneResource.h:9
Definition ProjectiveView.h:10
A scene for the editor renderer only.
Definition Scene.h:34
void runPendingCleanups(GHIThreadCaller &caller)
Definition Scene.cpp:168
void setSystem(System *sys)
Definition Scene.cpp:254
void createGHICommandsForDynamicResources(GHIThreadCaller &caller)
Definition Scene.cpp:246
void updateDynamicResources(const RenderThreadUpdateContext &ctx)
Definition Scene.cpp:238
void addResource(std::unique_ptr< ISceneResource > resource)
Definition Scene.cpp:177
Texture * getTexture(TextureHandle handle)
Definition Scene.cpp:88
ProjectiveView mainView
Definition Scene.h:68
Scene()
Definition Scene.cpp:24
void removeResource(ISceneResource *resource)
Definition Scene.cpp:209
const std::string & getDebugName() const
Definition Scene.h:101
TextureHandle declareTexture()
Definition Scene.cpp:73
~Scene()
Definition Scene.cpp:44
void runPendingSetups(GHIThreadCaller &caller)
Definition Scene.cpp:159
System & getSystem()
Definition Scene.h:95
void loadPicture(TextureHandle handle, const Path &pictureFile)
Definition Scene.cpp:111
void removeAllContents()
Definition Scene.cpp:260
void removeTexture(TextureHandle handle)
Definition Scene.cpp:93
void createTexture(TextureHandle handle, const ghi::TextureDesc &desc)
Definition Scene.cpp:78
void addDynamicResource(std::unique_ptr< IDynamicSceneResource > resource)
Definition Scene.cpp:192
void destroyRemovedResources()
Definition Scene.cpp:224
Definition PlatformDisplay.h:13
Definition DesignerObject.h:19
Definition ph_editor.h:10