ezEngine  Milestone 7
RenderPipelinePass.h
1 #pragma once
2 
3 #include <Foundation/Containers/HashTable.h>
4 #include <Foundation/Profiling/Profiling.h>
5 #include <Foundation/Strings/HashedString.h>
6 #include <Foundation/Types/UniquePtr.h>
7 #include <Foundation/Types/TagSet.h>
8 #include <CoreUtils/NodeGraph/Node.h>
9 #include <RendererCore/Pipeline/Declarations.h>
10 
11 class ezRenderPipeline;
12 
13 class EZ_RENDERERCORE_DLL ezRenderPipelinePass : public ezNode
14 {
16  EZ_DISALLOW_COPY_AND_ASSIGN(ezRenderPipelinePass);
17 
18 public:
19  ezRenderPipelinePass(const char* szName);
21 
22  void AddRenderer(ezUniquePtr<ezRenderer>&& pRenderer);
23  void RemoveRenderer(ezUniquePtr<ezRenderer>&& pRenderer);
24 
25  virtual void Execute(const ezRenderViewContext& renderViewContext) = 0;
26 
27  virtual void GetRenderTargetDescriptions(ezDynamicArray<ezGALTextureCreationDescription*>& outputs,
29 
30  void RenderDataWithPassType(const ezRenderViewContext& renderViewContext, ezRenderPassType passType);
31 
32  EZ_FORCE_INLINE ezRenderPipeline* GetPipeline()
33  {
34  return m_pPipeline;
35  }
36 
37 private:
38  friend class ezRenderPipeline;
39 
40  ezHashedString m_sName;
41  ezProfilingId m_ProfilingID;
42 
43  ezRenderPipeline* m_pPipeline;
44 
45  ezHashTable<const ezRTTI*, ezUInt32> m_TypeToRendererIndex;
47 };
48