nCine::RHI::RSX::RsxShader class

Shader-object stub of the RSX backend.

The RSX has no runtime shader compiler at all, so there is even less for this class to do than for its sceGxm counterpart: the microcode of every program variant is compiled offline by cgcomp and embedded in Shaders/Generated/RsxGeneratedShaders.h, and RsxShaderProgram merely looks its pair up there and hands it to the GPU. 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

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