Plasma Engine  2.0
Loading...
Searching...
No Matches
RenderTargetSetup.h
1
2#pragma once
3
4#include <Foundation/Basics.h>
5#include <RendererFoundation/RendererFoundationDLL.h>
6
7// \brief This class can be used to define the render targets to be used by an plView.
8struct PL_RENDERERFOUNDATION_DLL plGALRenderTargets
9{
10 bool operator==(const plGALRenderTargets& other) const;
11 bool operator!=(const plGALRenderTargets& other) const;
12
13 plGALTextureHandle m_hRTs[PL_GAL_MAX_RENDERTARGET_COUNT];
14 plGALTextureHandle m_hDSTarget;
15};
16
17// \brief This class can be used to construct render target setups on the stack.
18class PL_RENDERERFOUNDATION_DLL plGALRenderTargetSetup
19{
20public:
22
23 plGALRenderTargetSetup& SetRenderTarget(plUInt8 uiIndex, plGALRenderTargetViewHandle hRenderTarget);
24 plGALRenderTargetSetup& SetDepthStencilTarget(plGALRenderTargetViewHandle hDSTarget);
25
26 bool operator==(const plGALRenderTargetSetup& other) const;
27 bool operator!=(const plGALRenderTargetSetup& other) const;
28
29 inline plUInt8 GetRenderTargetCount() const;
30
31 inline plGALRenderTargetViewHandle GetRenderTarget(plUInt8 uiIndex) const;
32 inline plGALRenderTargetViewHandle GetDepthStencilTarget() const;
33
34 void DestroyAllAttachedViews();
35
36protected:
37 plGALRenderTargetViewHandle m_hRTs[PL_GAL_MAX_RENDERTARGET_COUNT];
39
40 plUInt8 m_uiRTCount = 0;
41};
42
43struct PL_RENDERERFOUNDATION_DLL plGALRenderingSetup
44{
45 bool operator==(const plGALRenderingSetup& other) const;
46 bool operator!=(const plGALRenderingSetup& other) const;
47
48 plGALRenderTargetSetup m_RenderTargetSetup;
49 plColor m_ClearColor = plColor(0, 0, 0, 0);
50 plUInt32 m_uiRenderTargetClearMask = 0x0;
51 float m_fDepthClear = 1.0f;
52 plUInt8 m_uiStencilClear = 0;
53 bool m_bClearDepth = false;
54 bool m_bClearStencil = false;
55 bool m_bDiscardColor = false;
56 bool m_bDiscardDepth = false;
57};
58
59#include <RendererFoundation/Resources/Implementation/RenderTargetSetup_inl.h>
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Definition RenderTargetSetup.h:19
Definition RendererFoundationDLL.h:453
Definition RendererFoundationDLL.h:411
Definition RenderTargetSetup.h:9
Definition RenderTargetSetup.h:44