|
CeresEngine 0.2.0
A game development framework
|
A ShaderBinary is an object responsible for wrapping the binary representation of a shader (i.e. More...
#include <CeresEngine/Material/ShaderSource.hpp>
Public Types | |
| using | BinaryBuffer = Vector< char > |
| A binary buffer type. | |
Public Member Functions | |
| ShaderBinary () noexcept | |
| Creates a empty shader binary. | |
| ShaderBinary (ShaderType shaderType, BinaryBuffer binary) noexcept | |
| Creates a new shader binary from its binary representation. | |
| ShaderBinary (ShaderType shaderType, const unsigned char *binary, size_t length) | |
| Creates a new shader binary from its binary representation. | |
| ShaderBinary (const ShaderBinary &other) | |
| Creates a new shader binary by copying the contents of another. | |
| ShaderBinary & | operator= (const ShaderBinary &other) |
| Assigns the contents from another shader binary object. | |
| ShaderBinary (ShaderBinary &&other) noexcept | |
| Creates a new shader binary by moving the contents of another. | |
| ShaderBinary & | operator= (ShaderBinary &&other) noexcept |
| Assigns the contents from another shader binary object. | |
| bool | isValid () const noexcept |
| operator bool () const noexcept | |
Static Public Member Functions | |
| template<typename Processor > | |
| static constexpr void | reflect (Processor &&RTTI) |
| Executes the given processor for every field of the struct. | |
Public Attributes | |
| ShaderType | type = ShaderType::Undefined |
| The shader stage type. | |
| BinaryBuffer | data |
| The shader binary code. | |
A ShaderBinary is an object responsible for wrapping the binary representation of a shader (i.e.
its compiled code).
This shader binary object can be copied, moved and passed by reference to a shader implementation. The shader implementations will use the contents of this object to load the binary representation of the shader into the GPU.
Please note that many implementations are not cross platform and binary compiled shaders can only be loaded on the same computer with the same GPU.
A binary buffer type.
|
noexcept |
Creates a empty shader binary.
|
explicitnoexcept |
Creates a new shader binary from its binary representation.
| shaderType | The shader stage type |
| binary | The shader binary code |
| CeresEngine::ShaderBinary::ShaderBinary | ( | ShaderType | shaderType, |
| const unsigned char * | binary, | ||
| size_t | length | ||
| ) |
Creates a new shader binary from its binary representation.
| shaderType | The shader stage type |
| binary | The shader binary code |
| length | The shader binary code length |
| CeresEngine::ShaderBinary::ShaderBinary | ( | const ShaderBinary & | other | ) |
Creates a new shader binary by copying the contents of another.
| other | The shader binary to copy the contents from |
|
noexcept |
Creates a new shader binary by moving the contents of another.
| other | The shader binary to copy the contents from |
|
noexcept |
|
explicitnoexcept |
| ShaderBinary & CeresEngine::ShaderBinary::operator= | ( | const ShaderBinary & | other | ) |
Assigns the contents from another shader binary object.
| other | The shader binary to copy the contents from |
|
noexcept |
Assigns the contents from another shader binary object.
| other | The shader binary to move the contents from |
Executes the given processor for every field of the struct.
| RTTI | The processor to be ran for every field. |
| BinaryBuffer CeresEngine::ShaderBinary::data |
The shader binary code.
| ShaderType CeresEngine::ShaderBinary::type = ShaderType::Undefined |
The shader stage type.