GsShader class
#include <nCine/Graphics/RHI/GS/GsShader.h>
Shader-object stub of the GS backend.
The Graphics Synthesizer is fixed-function - it has one texture function and one blend equation per draw, and no programmable stage at all - so the backend dispatches the effect functions transpiled from the shaders' fixed_function blocks instead of compiling anything. 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 GS backend).
- enum class ErrorChecking { Immediate, Deferred }
- When the compilation status is checked (irrelevant for the GS backend).
Constructors, destructors, conversion operators
-
GsShader(std::
uint32_t type) explicit -
GsShader(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)