|
sKit
0.0.9
|
SDL_GPUShader builder class
More...
#include <ShaderBuilder.hpp>
Public Member Functions | |
| ShaderBuilder () | |
| auto | path (std::string path) noexcept -> ShaderBuilder & |
| auto | vertex () noexcept -> ShaderBuilder & |
| Tells the builder that the shader built is a vertex shader. More... | |
| auto | fragment () noexcept -> ShaderBuilder & |
| Tells the builder that the shader built is a fragment shader. More... | |
| auto | numUniformBuffers (uint32_t n) noexcept -> ShaderBuilder & |
| Tells the builder how many uniform bufferms the shader will receive. More... | |
| auto | build (SDL_GPUDevice *device) -> SDL_GPUShader * |
SDL_GPUShader builder class
Example:
Definition at line 20 of file ShaderBuilder.hpp.
|
inline |
Definition at line 22 of file ShaderBuilder.hpp.
| auto sKit::SDL::ShaderBuilder::build | ( | SDL_GPUDevice * | device | ) | -> SDL_GPUShader* |
By default, builds a vertex shader with no uniform buffers.
| std::runtime_error | if shader path is invalid or shader failed to create |
Definition at line 30 of file ShaderBuilder.cpp.
|
noexcept |
Tells the builder that the shader built is a fragment shader.
Definition at line 20 of file ShaderBuilder.cpp.
|
noexcept |
Tells the builder how many uniform bufferms the shader will receive.
Definition at line 25 of file ShaderBuilder.cpp.
|
noexcept |
| path | path to the shader in SPIRV format |
Definition at line 10 of file ShaderBuilder.cpp.
|
noexcept |
Tells the builder that the shader built is a vertex shader.
Definition at line 15 of file ShaderBuilder.cpp.