nCine::RHI::Software::SwUniform class

Reflected metadata of a single active uniform (aliased as RHI::Uniform).

Holds everything the software backend needs about one uniform imported from the offline reflection: its name, scalar/vector/matrix type, array size, a synthetic sequential location and, for uniforms living inside a block, the owning block index and std140 byte offset. It carries no value storage — a SwUniformCache holds the value.

Public static variables

static std::uint32_t MaxNameLength constexpr
Maximum length of a uniform name, including the terminating null character.

Constructors, destructors, conversion operators

SwUniform()
SwUniform(SwShaderProgram* owner, const char* name, ShaderCompiler::UniformType type, std::int32_t arraySize, std::int32_t location)

Public functions

auto GetLocation() const -> std::int32_t
auto GetBlockIndex() const -> std::int32_t
auto GetSize() const -> std::int32_t
auto GetType() const -> ShaderCompiler::UniformType
Returns the reflected (backend-neutral) type of the uniform.
auto GetOffset() const -> std::int32_t
auto GetName() const -> const char*
auto GetOwner() const -> SwShaderProgram*
auto GetComponentCount() const -> std::uint32_t
auto IsFloat() const -> bool
auto GetMemorySize() const -> std::uint32_t