| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <nn/gfx/detail/gfx_DataContainer.h> |
| 4 | #include <nn/gfx/gfx_Enum.h> |
| 5 | #include <nn/gfx/gfx_ShaderInfoData.h> |
| 6 | |
| 7 | namespace nn::gfx { |
| 8 | |
| 9 | class ShaderInfo : public detail::DataContainer<ShaderInfoData> { |
| 10 | public: |
| 11 | ShaderInfo() {} |
| 12 | |
| 13 | void SetDefault(); |
| 14 | |
| 15 | void SetSeparationEnabled(bool value) { flags.SetBit(p: Flag_SeparationEnable, on: value); } |
| 16 | void SetCodeType(ShaderCodeType value) { codeType = value; } |
| 17 | void SetSourceFormat(ShaderSourceFormat value) { sourceFormat = value; } |
| 18 | void SetBinaryFormat(int value) { binaryFormat = value; } |
| 19 | void SetShaderCodePtr(ShaderStage, const void*); |
| 20 | |
| 21 | bool IsSeparationEnabled() const { return flags.GetBit(p: Flag_SeparationEnable); } |
| 22 | ShaderCodeType GetCodeType() const { return static_cast<ShaderCodeType>(codeType); } |
| 23 | int GetBinaryFormat() const { return binaryFormat; } |
| 24 | |
| 25 | ShaderSourceFormat GetSourceFormat() const { |
| 26 | return static_cast<ShaderSourceFormat>(sourceFormat); |
| 27 | } |
| 28 | |
| 29 | const void* GetShaderCodePtr(ShaderStage) const; |
| 30 | }; |
| 31 | |
| 32 | } // namespace nn::gfx |