nCine::RHI::RSX::RsxVertexFormat class

Vertex layout description of the RSX backend (aliased as RHI::VertexFormat).

Records the set of vertex attributes (component count, type, stride, offset and source buffer) the way the OpenGL backend does, so the pipeline's attribute setup code compiles unchanged. Unlike the sceGxm backend, which has to bake a layout into a patched vertex program, the RSX takes each attribute's format and source at draw time through rsxBindVertexArrayAttrib() - so the recorded layout is simply replayed by RsxDevice::DrawCommon() and nothing is compiled from it.

Public types

class Attribute
A single vertex attribute within a vertex format.

Public static variables

static std::uint32_t MaxAttributes constexpr
The maximum number of vertex attributes.

Constructors, destructors, conversion operators

RsxVertexFormat()

Public functions

auto GetAttributeCount() const -> std::uint32_t
auto GetIbo() const -> const RsxBufferObject*
void SetIbo(const RsxBufferObject* ibo)
void Define()
Applies the vertex format (no-op; the recorded layout is consumed at input-layout creation).
void Reset()
Disables all attributes and clears the index buffer.
auto CalculateFingerprint() const -> std::uint64_t
Returns a value identifying this layout, used by RenderVaoPool to reuse a vertex array.
auto operator[](std::uint32_t index) -> Attribute&
auto operator[](std::uint32_t index) const -> const Attribute&
auto operator==(const RsxVertexFormat& other) const -> bool
auto operator!=(const RsxVertexFormat& other) const -> bool

Function documentation

std::uint64_t nCine::RHI::RSX::RsxVertexFormat::CalculateFingerprint() const

Returns a value identifying this layout, used by RenderVaoPool to reuse a vertex array.

The RSX compiles nothing from a layout, so this backend needs no cache of its own - but the shared RenderVaoPool keys on this digest across every backend, so it is provided with the same meaning it has elsewhere: which attribute slots are enabled, and each one's component count, component type, normalization, within-vertex offset and stream stride. The source buffer and its base offset are deliberately left out, so two draws out of different ring-buffer regions match.