nCine::RHI::GU::GuShader class

Shader-object stub of the GU backend.

GX is fixed-function - the backend drives TEV configurations selected from the program's label and the offline reflection instead of compiling GLSL - 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 GU backend).
enum class ErrorChecking { Immediate, Deferred }
When the compilation status is checked (irrelevant for the GU backend).

Constructors, destructors, conversion operators

GuShader(std::uint32_t type) explicit
GuShader(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)