Plasma Engine  2.0
Loading...
Searching...
No Matches
FrameDataProvider.h
1#pragma once
2
3#include <RendererCore/Pipeline/Declarations.h>
4
5class PL_RENDERERCORE_DLL plFrameDataProviderBase : public plReflectedClass
6{
7 PL_ADD_DYNAMIC_REFLECTION(plFrameDataProviderBase, plReflectedClass);
8
9protected:
11
12 virtual void* UpdateData(const plRenderViewContext& renderViewContext, const plExtractedRenderData& extractedData) = 0;
13
14 void* GetData(const plRenderViewContext& renderViewContext);
15
16private:
17 friend class plRenderPipeline;
18
19 const plRenderPipeline* m_pOwnerPipeline = nullptr;
20 void* m_pData = nullptr;
21 plUInt64 m_uiLastUpdateFrame = 0;
22};
23
24template <typename T>
26{
27public:
28 T* GetData(const plRenderViewContext& renderViewContext) { return static_cast<T*>(plFrameDataProviderBase::GetData(renderViewContext)); }
29};
Definition ExtractedRenderData.h:10
Definition FrameDataProvider.h:6
Definition FrameDataProvider.h:26
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
Definition RenderPipeline.h:20
Definition Declarations.h:51