/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/RendererFoundation/Descriptors/Implementation/Descriptors_inl.h
71 строка
2 KB
Sanakan8472
Render Graph (#1948)
03 июн 2026, 10:19
Не верифицирован
03 июн 2026, 10:19
60bb12c
Код
Авторство
О чём код?
inline ezGALShaderCreationDescription::ezGALShaderCreationDescription() : ezHashableStruct() { } inline ezGALShaderCreationDescription::ezGALShaderCreationDescription(const ezGALShaderCreationDescription& other) { for (ezUInt32 i = 0; i < ezGALShaderStage::ENUM_COUNT; ++i) { m_ByteCodes[i] = other.m_ByteCodes[i]; } } inline ezGALShaderCreationDescription::~ezGALShaderCreationDescription() { for (ezUInt32 i = 0; i < ezGALShaderStage::ENUM_COUNT; ++i) { m_ByteCodes[i] = nullptr; } } inline void ezGALShaderCreationDescription::operator=(const ezGALShaderCreationDescription& other) { for (ezUInt32 i = 0; i < ezGALShaderStage::ENUM_COUNT; ++i) { m_ByteCodes[i] = other.m_ByteCodes[i]; } } inline bool ezGALShaderCreationDescription::HasByteCodeForStage(ezGALShaderStage::Enum stage) const { return m_ByteCodes[stage] != nullptr && m_ByteCodes[stage]->IsValid(); } inline void ezGALTextureCreationDescription::SetAsRenderTarget(ezUInt32 uiWidth, ezUInt32 uiHeight, ezGALResourceFormat::Enum format, ezGALMSAASampleCount::Enum sampleCount) { m_uiWidth = uiWidth; m_uiHeight = uiHeight; m_uiDepth = 1; m_uiMipLevelCount = 1; m_uiArraySize = 1; m_SampleCount = sampleCount; m_Format = format; m_Type = ezGALTextureType::Texture2D; m_TextureFlags = ezGALTextureUsageFlags::ShaderResource | ezGALTextureUsageFlags::RenderTarget; m_ResourceAccess.m_bImmutable = false; m_pExisitingNativeObject = nullptr; } inline void ezGALTextureCreationDescription::SetAsRenderTarget(ezUInt32 uiWidth, ezUInt32 uiHeight, ezUInt32 uiArraySize, ezGALResourceFormat::Enum format, ezGALMSAASampleCount::Enum sampleCount) { m_uiWidth = uiWidth; m_uiHeight = uiHeight; m_uiDepth = 1; m_uiMipLevelCount = 1; m_uiArraySize = uiArraySize; m_SampleCount = sampleCount; m_Format = format; m_Type = uiArraySize == 1 ? ezGALTextureType::Texture2D : ezGALTextureType::Texture2DArray; m_TextureFlags = ezGALTextureUsageFlags::ShaderResource | ezGALTextureUsageFlags::RenderTarget; m_ResourceAccess.m_bImmutable = false; m_pExisitingNativeObject = nullptr; } EZ_ALWAYS_INLINE constexpr ezGALVertexAttribute::ezGALVertexAttribute(ezGALVertexAttributeSemantic::Enum semantic, ezGALResourceFormat::Enum format, ezUInt8 uiOffset, ezUInt8 uiVertexBufferSlot) : m_eSemantic(semantic) , m_eFormat(format) , m_uiOffset(uiOffset) , m_uiVertexBufferSlot(uiVertexBufferSlot) { }