ezEngine  Milestone 9
Declarations.h
1 #pragma once
2 
4 #include <Core/World/Declarations.h>
5 #include <RendererCore/RendererCoreDLL.h>
6 #include <RendererFoundation/RendererFoundationDLL.h>
7 #include <RendererFoundation/Descriptors/Descriptors.h>
8 
9 class ezCamera;
11 class ezExtractor;
12 class ezView;
13 class ezRenderData;
14 class ezRenderDataBatch;
15 class ezRenderPipeline;
17 class ezGALContext;
18 class ezRenderContext;
20 
21 struct ezNodePin;
23 struct ezViewData;
24 
25 namespace ezInternal
26 {
27  struct RenderDataCache;
28 
30  {
31  EZ_DECLARE_POD_TYPE();
32 
33  const ezRenderData* m_pRenderData;
34  ezUInt32 m_uiSortingKey;
35  ezUInt16 m_uiCategory;
36  ezUInt16 m_uiComponentIndex : 15;
37  ezUInt16 m_uiCacheIfStatic : 1;
38  };
39 }
40 
42 {
43  const ezCamera* m_pCamera;
44  const ezViewData* m_pViewData;
45  ezRenderContext* m_pRenderContext;
46 
47  const ezDebugRendererContext* m_pWorldDebugContext;
48  const ezDebugRendererContext* m_pViewDebugContext;
49 };
50 
52 
54 {
55  EZ_DECLARE_HANDLE_TYPE(ezViewHandle, ezViewId);
56 
57  friend class ezRenderWorld;
58 };
59 
61 template <>
63 {
64  EZ_ALWAYS_INLINE static ezUInt32 Hash(ezViewHandle value)
65  {
66  return value.GetInternalID().m_Data * 2654435761U;
67  }
68 
69  EZ_ALWAYS_INLINE static bool Equal(ezViewHandle a, ezViewHandle b)
70  {
71  return a == b;
72  }
73 };
74 
78 class EZ_RENDERERCORE_DLL ezRenderer : public ezReflectedClass
79 {
80  EZ_ADD_DYNAMIC_REFLECTION(ezRenderer, ezReflectedClass);
81 
82 public:
83  virtual void GetSupportedRenderDataTypes(ezHybridArray<const ezRTTI*, 8>& types) = 0;
84 
85  virtual void RenderBatch(const ezRenderViewContext& renderViewContext, ezRenderPipelinePass* pPass, const ezRenderDataBatch& batch) = 0;
86 };
87 
89 struct EZ_RENDERERCORE_DLL ezCameraUsageHint
90 {
91  typedef ezUInt8 StorageType;
92 
93  enum Enum
94  {
95  None,
96  MainView,
97  EditorView,
98  RenderTarget,
99  Culling,
100  Shadow,
101  Thumbnail,
102 
103  ENUM_COUNT,
104 
105  Default = None,
106  };
107 };
108 
109 EZ_DECLARE_REFLECTABLE_TYPE(EZ_RENDERERCORE_DLL, ezCameraUsageHint);
110 
A camera class that stores the orientation and some basic camera settings.
Definition: Camera.h:37
Encapsulates a view on the given world through the given camera and rendered with the specified Rende...
Definition: View.h:18
Definition: RenderWorld.h:8
Definition: Extractor.h:6
Definition: DebugRendererContext.h:10
Definition: RenderPipeline.h:15
Definition: HybridArray.h:79
Definition: Declarations.h:29
All classes that should be dynamically reflectable, need to be derived from this base class...
Definition: DynamicRTTI.h:67
Helper struct to calculate the Hash of different types.
Definition: HashingUtils.h:47
Base class for all render data. Render data must contain all information that is needed to render the...
Definition: RenderData.h:11
Definition: ExtractedRenderData.h:9
Holds view data like the viewport, view and projection matrices.
Definition: ViewData.h:9
Definition: Declarations.h:41
Definition: Context.h:12
#define EZ_DECLARE_REFLECTABLE_TYPE(Linkage, TYPE)
Declares a type to be statically reflectable. Insert this into the header of a type to enable reflect...
Definition: StaticRTTI.h:123
Definition: RenderContext.h:20
Passed to ezRenderPipelinePass::InitRenderPipelinePass to inform about existing connections on each i...
Definition: RenderPipelinePass.h:14
Definition: RenderDataBatch.h:5
Definition: Declarations.h:53
Definition: EventMessage.h:27
Definition: RenderPipelinePass.h:27
Usage hint of a camera/view.
Definition: Declarations.h:89
This is the base class for types that handle rendering of different object types. ...
Definition: Declarations.h:78
Definition: Node.h:9