Plasma Engine  2.0
Loading...
Searching...
No Matches
RenderPipelinePass.h
1#pragma once
2
3#include <Foundation/Containers/HashTable.h>
4#include <Foundation/Strings/HashedString.h>
5#include <Foundation/Types/UniquePtr.h>
6#include <RendererCore/Pipeline/RenderData.h>
7#include <RendererCore/Pipeline/RenderDataBatch.h>
8#include <RendererCore/Pipeline/RenderPipelineNode.h>
9
11class plStreamWriter;
12
24
25class PL_RENDERERCORE_DLL plRenderPipelinePass : public plRenderPipelineNode
26{
27 PL_ADD_DYNAMIC_REFLECTION(plRenderPipelinePass, plRenderPipelineNode);
28 PL_DISALLOW_COPY_AND_ASSIGN(plRenderPipelinePass);
29
30public:
31 plRenderPipelinePass(const char* szName, bool bIsStereoAware = false);
33
35 void SetName(const char* szName);
36
38 const char* GetName() const;
39
41 bool IsStereoAware() const { return m_bIsStereoAware; }
42
46
53
58 virtual void InitRenderPipelinePass(const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs);
59
64
65 virtual void ExecuteInactive(const plRenderViewContext& renderViewContext, const plArrayPtr<plRenderPipelinePassConnection* const> inputs, const plArrayPtr<plRenderPipelinePassConnection* const> outputs);
66
68 virtual void ReadBackProperties(plView* pView);
69
70 virtual plResult Serialize(plStreamWriter& inout_stream) const;
71 virtual plResult Deserialize(plStreamReader& inout_stream);
72
73 void RenderDataWithCategory(const plRenderViewContext& renderViewContext, plRenderData::Category category, plRenderDataBatch::Filter filter = plRenderDataBatch::Filter());
74
75 PL_ALWAYS_INLINE plRenderPipeline* GetPipeline() { return m_pPipeline; }
76 PL_ALWAYS_INLINE const plRenderPipeline* GetPipeline() const { return m_pPipeline; }
77
78private:
79 friend class plRenderPipeline;
80
81 bool m_bActive = true;
82
83 const bool m_bIsStereoAware;
84 plHashedString m_sName;
85
86 plRenderPipeline* m_pPipeline = nullptr;
87};
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Definition RendererFoundationDLL.h:411
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition RenderPipeline.h:20
Definition RenderPipelineNode.h:79
Definition RenderPipelinePass.h:26
bool IsStereoAware() const
True if the render pipeline pass can handle stereo cameras correctly.
Definition RenderPipelinePass.h:41
virtual void Execute(const plRenderViewContext &renderViewContext, const plArrayPtr< plRenderPipelinePassConnection *const > inputs, const plArrayPtr< plRenderPipelinePassConnection *const > outputs)=0
Render into outputs. Both inputs and outputs are passed in with actual texture handles....
virtual plGALTextureHandle QueryTextureProvider(const plRenderPipelineNodePin *pPin, const plGALTextureCreationDescription &desc)
Definition RenderPipelinePass.h:52
virtual bool GetRenderTargetDescriptions(const plView &view, const plArrayPtr< plGALTextureCreationDescription *const > inputs, plArrayPtr< plGALTextureCreationDescription > outputs)=0
For a given input pin configuration, provide the output configuration of this node....
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition View.h:21
Definition Descriptors.h:177
Definition RenderData.h:19
Definition RenderPipelineNode.h:10
Passed to plRenderPipelinePass::InitRenderPipelinePass to inform about existing connections on each i...
Definition RenderPipelinePass.h:16
const plRenderPipelineNodePin * m_pOutput
The output pin that this connection spawns from.
Definition RenderPipelinePass.h:21
plHybridArray< const plRenderPipelineNodePin *, 4 > m_Inputs
The various input pins this connection is connected to.
Definition RenderPipelinePass.h:22
Definition Declarations.h:51
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54