RAII wrapper around SDL_GPUShader, with loading utilities.
More...
#include <candlewick/core/Shader.h>
|
| struct | Config |
| | Shader configuration: number of uniforms, texture samplers, storage textures and storage buffers. More...
|
| |
RAII wrapper around SDL_GPUShader, with loading utilities.
The Shader class wrap around the SDL GPU shader handle. It creates it upon construction of the class, and will release it upon destruction.
◆ Shader() [1/3]
| candlewick::Shader::Shader |
( |
const Device & | device, |
|
|
const char * | filename, |
|
|
const Config & | config ) |
Load a shader to device provided the shader name and configuration.
- Parameters
-
| device | GPU device |
| filename | Filename of the shader text source, as in the assets/shaders/src |
| config | Configuration struct |
◆ Shader() [2/3]
| candlewick::Shader::Shader |
( |
const Shader & | | ) |
|
|
delete |
Deleted copy constructor.
◆ Shader() [3/3]
| candlewick::Shader::Shader |
( |
Shader && | other | ) |
|
|
inlinenoexcept |
◆ ~Shader()
| candlewick::Shader::~Shader |
( |
| ) |
|
|
inlinenoexcept |
◆ fromMetadata()
| Shader candlewick::Shader::fromMetadata |
( |
const Device & | device, |
|
|
const char * | filename ) |
|
inlinestatic |
Load shader from metadata.
◆ operator SDL_GPUShader *()
| candlewick::Shader::operator SDL_GPUShader * |
( |
| ) |
const |
|
inlinenoexcept |
◆ release()
| void candlewick::Shader::release |
( |
| ) |
|
|
noexcept |
◆ stage()
| SDL_GPUShaderStage candlewick::Shader::stage |
( |
| ) |
const |
|
inlinenoexcept |
The documentation for this struct was generated from the following file: