Gx2Shader class
#include <nCine/Graphics/RHI/GX2/Gx2Shader.h>
Shader-object stub of the GX2 backend.
The game does not compile shaders on the console: every program variant is compiled offline by CafeGLSL and embedded in a generated table, which Gx2ShaderProgram looks up by program identity. This class therefore carries no source of its own and every operation succeeds trivially, 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 this stub).
- enum class ErrorChecking { Immediate, Deferred }
- When the compilation status is checked (irrelevant for this stub).
Constructors, destructors, conversion operators
-
Gx2Shader(std::
uint32_t type) explicit -
Gx2Shader(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)