Nebula
Loading...
Searching...
No Matches
rtplugin.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
28#include "core/refcounted.h"
29#include "timing/time.h"
30#include "util/stringatom.h"
31
32namespace Graphics
33{
34class Stage;
35class View;
36class GraphicsEntity;
37};
38
39//------------------------------------------------------------------------------
40namespace RenderModules
41{
43{
45public:
47 RTPlugin();
49 virtual ~RTPlugin();
50
52 virtual void OnRegister();
54 virtual void OnUnregister();
56 virtual void OnStageCreated(const Ptr<Graphics::Stage>& stage);
58 virtual void OnDiscardStage(const Ptr<Graphics::Stage>& stage);
60 virtual void OnViewCreated(const Ptr<Graphics::View>& view);
62 virtual void OnDiscardView(const Ptr<Graphics::View>& view);
64 virtual void OnAttachEntity(const Ptr<Graphics::GraphicsEntity>& entity);
66 virtual void OnRemoveEntity(const Ptr<Graphics::GraphicsEntity>& entity);
68 virtual void OnUpdateBefore(IndexT frameId, Timing::Time time);
70 virtual void OnUpdateAfter(IndexT frameId, Timing::Time time);
72 virtual void OnRenderBefore(IndexT frameId, Timing::Time time);
74 virtual void OnRenderAfter(IndexT frameId, Timing::Time time);
76 virtual void OnRender(const Util::StringAtom& filter);
78 virtual void OnFrameBefore(IndexT frameId, Timing::Time time);
80 virtual void OnFrameAfter(IndexT frameId, Timing::Time time);
82 virtual void OnRenderFrame();
84 virtual void OnRenderWithoutView(IndexT frameId, Timing::Time time);
86 virtual void OnWindowResized(IndexT windowId, SizeT width, SizeT height);
87};
88
89} // namespace RenderModules
90//------------------------------------------------------------------------------
The common base class of Nebula.
Definition refcounted.h:38
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Standard interface to add new functionality to the render thread.
Definition rtplugin.h:43
virtual void OnViewCreated(const Ptr< Graphics::View > &view)
called when a new view has been created
Definition rtplugin.cc:71
virtual void OnRegister()
called when plugin is registered on the render-thread side
Definition rtplugin.cc:35
virtual void OnRender(const Util::StringAtom &filter)
called when rendering a specific subset of plugins
Definition rtplugin.cc:143
virtual void OnUnregister()
called when plugin is unregistered on the render-thread side
Definition rtplugin.cc:44
virtual void OnRemoveEntity(const Ptr< Graphics::GraphicsEntity > &entity)
called when a graphics entity is being removed from a stage
Definition rtplugin.cc:98
virtual void OnWindowResized(IndexT windowId, SizeT width, SizeT height)
called if the window size has changed
Definition rtplugin.cc:188
virtual void OnUpdateBefore(IndexT frameId, Timing::Time time)
called before updating entities
Definition rtplugin.cc:107
virtual void OnRenderWithoutView(IndexT frameId, Timing::Time time)
called if no view exists, and no default camera is set in view
Definition rtplugin.cc:179
virtual void OnRenderAfter(IndexT frameId, Timing::Time time)
called after rendering entities
Definition rtplugin.cc:134
virtual void OnUpdateAfter(IndexT frameId, Timing::Time time)
called after updating entities
Definition rtplugin.cc:116
virtual void OnRenderFrame()
called when rendering from special frame tag
Definition rtplugin.cc:170
virtual void OnAttachEntity(const Ptr< Graphics::GraphicsEntity > &entity)
called when a graphics entity has been attached to a stage
Definition rtplugin.cc:89
virtual void OnDiscardStage(const Ptr< Graphics::Stage > &stage)
called when a stage is discarded
Definition rtplugin.cc:62
virtual void OnDiscardView(const Ptr< Graphics::View > &view)
called when a view is being discarded
Definition rtplugin.cc:80
virtual ~RTPlugin()
destructor
Definition rtplugin.cc:26
virtual void OnFrameAfter(IndexT frameId, Timing::Time time)
called at the end of frame
Definition rtplugin.cc:161
RTPlugin()
constructor
Definition rtplugin.cc:18
virtual void OnStageCreated(const Ptr< Graphics::Stage > &stage)
called when a new stage has been created
Definition rtplugin.cc:53
virtual void OnFrameBefore(IndexT frameId, Timing::Time time)
called at the beginning of frame
Definition rtplugin.cc:152
virtual void OnRenderBefore(IndexT frameId, Timing::Time time)
called before rendering entities
Definition rtplugin.cc:125
A StringAtom.
Definition stringatom.h:22
Implements the shader server used by Vulkan.
Definition cameramanager.h:21
Definition rendermodule.cc:11
double Time
the time datatype
Definition time.h:18
Typedefs for the Timing subsystem.
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48