Plasma Engine  2.0
Loading...
Searching...
No Matches
Descriptors_inl.h
1
2
3inline plGALShaderCreationDescription::plGALShaderCreationDescription()
5{
6}
7
8inline plGALShaderCreationDescription::~plGALShaderCreationDescription()
9{
10 for (plUInt32 i = 0; i < plGALShaderStage::ENUM_COUNT; ++i)
11 {
12 m_ByteCodes[i] = nullptr;
13 }
14}
15
16inline bool plGALShaderCreationDescription::HasByteCodeForStage(plGALShaderStage::Enum stage) const
17{
18 return m_ByteCodes[stage] != nullptr && m_ByteCodes[stage]->IsValid();
19}
20
21inline void plGALTextureCreationDescription::SetAsRenderTarget(
22 plUInt32 uiWidth, plUInt32 uiHeight, plGALResourceFormat::Enum format, plGALMSAASampleCount::Enum sampleCount /*= plGALMSAASampleCount::None*/)
23{
24 m_uiWidth = uiWidth;
25 m_uiHeight = uiHeight;
26 m_uiDepth = 1;
27 m_uiMipLevelCount = 1;
28 m_uiArraySize = 1;
29 m_SampleCount = sampleCount;
30 m_Format = format;
31 m_Type = plGALTextureType::Texture2D;
32 m_bAllowShaderResourceView = true;
33 m_bAllowUAV = false;
34 m_bCreateRenderTarget = true;
35 m_bAllowDynamicMipGeneration = false;
36 m_ResourceAccess.m_bReadBack = false;
37 m_ResourceAccess.m_bImmutable = true;
39}
40
41PL_FORCE_INLINE plGALVertexAttribute::plGALVertexAttribute(
42 plGALVertexAttributeSemantic::Enum semantic, plGALResourceFormat::Enum format, plUInt16 uiOffset, plUInt8 uiVertexBufferSlot, bool bInstanceData)
43 : m_eSemantic(semantic)
44 , m_eFormat(format)
45 , m_uiOffset(uiOffset)
46 , m_uiVertexBufferSlot(uiVertexBufferSlot)
47 , m_bInstanceData(bInstanceData)
48{
49}
This class provides a base class for hashable structs (e.g. descriptor objects).
Definition HashableStruct.h:17
void * m_pExisitingNativeObject
Can be used to encapsulate existing native textures in objects usable by the GAL.
Definition Descriptors.h:197