Class Shader
Defined in File Shader.hpp
Inheritance Relationships
Base Type
public Cacao::Asset(Class Asset)
Class Documentation
-
class Shader : public Cacao::Asset
Asset type for GPU shaders.
Public Functions
-
virtual void Realize()
Convert the shader data into a form suitable for rendering.
- Throws:
BadRealizeStateException – If the shader is already realized
BadInitStateException – If the graphics backend is not initialized or connected
Public Static Functions
-
static inline std::shared_ptr<Shader> Create(std::vector<unsigned char> &&shaderIR, ShaderDescription desc, const std::string &addr)
Create a new shader from IR code.
- Parameters:
shaderIR – The Slang IR code to create the shader with
desc – Shader behavior and input information
addr – The resource address to associate with the shader
- Throws:
BadValueException – If the IR code buffer is empty
BadValueException – If the shader description contains invalid data
BadValueException – If the address is malformed
-
virtual void Realize()