SwShader class
Shader-object stub of the software backend.
The software backend does not compile GLSL — it drives hand-written C++ effects selected from the offline reflection instead — so this class carries no source and every operation succeeds trivially. It exists only to satisfy the RHI::Shader contract alias.
Public types
- enum class Status { NotCompiled, CompilationFailed, Compiled, CompiledWithDeferredChecks }
- Compilation status of the shader (always Status::Compiled for the software backend).
- enum class ErrorChecking { Immediate, Deferred }
- When the compilation status is checked (irrelevant for the software backend).
Constructors, destructors, conversion operators
-
SwShader(std::
uint32_t type) explicit -
SwShader(std::
uint32_t type, StringView filename)
Public functions
-
auto GetGLHandle() const -> std::
uint32_t - auto GetStatus() const -> Status
- auto LoadFromString(StringView string) -> bool
- auto LoadFromStrings(ArrayView<const StringView> strings) -> bool
- auto LoadFromFile(StringView filename) -> bool
- auto Compile(ErrorChecking errorChecking, bool logOnErrors) -> bool
- auto CheckCompilation(bool logOnErrors) -> bool
- void SetObjectLabel(StringView label)