nCine::RHI::IRhiCapabilities class

Interface to query the runtime capabilities of the selected RHI backend.

Abstracts access to the version numbers, information strings, integer limits and extension availability flags of the active rendering device, so renderer code can adapt to it without issuing backend queries directly. The value and extension names are the OpenGL ones the render pipeline has always read; a backend that has no OpenGL context publishes the equivalent limit of its own API under the same name. RhiCapabilitiesBase is the shared implementation every backend derives from, aliased as RHI::Capabilities for the backend selected at compile time.

Derived classes

class RhiCapabilitiesBase
Backend-independent part of the RHI capabilities.

Public types

struct InfoStrings
Device information strings.
enum class ApiVersion { Major, Minor, Release }
API version component.
enum class IntValues { MAX_TEXTURE_SIZE = 0, MAX_TEXTURE_IMAGE_UNITS, MAX_UNIFORM_BLOCK_SIZE, MAX_UNIFORM_BLOCK_SIZE_NORMALIZED, MAX_UNIFORM_BUFFER_BINDINGS, MAX_VERTEX_UNIFORM_BLOCKS, MAX_FRAGMENT_UNIFORM_BLOCKS, UNIFORM_BUFFER_OFFSET_ALIGNMENT, MAX_VERTEX_ATTRIB_STRIDE, MAX_COLOR_ATTACHMENTS, NUM_PROGRAM_BINARY_FORMATS, Count }
Queryable runtime integer value.
enum class ArrayIntValues { PROGRAM_BINARY_FORMATS = 0, Count }
Queryable runtime integer array value.
enum class Extensions { KHR_DEBUG = 0, ARB_TEXTURE_STORAGE, ARB_BUFFER_STORAGE, ARB_GET_PROGRAM_BINARY, EXT_TEXTURE_COMPRESSION_S3TC, AMD_COMPRESSED_ATC_TEXTURE, IMG_TEXTURE_COMPRESSION_PVRTC, KHR_TEXTURE_COMPRESSION_ASTC_LDR, Count }
Queryable OpenGL extension, only ever available with the OpenGL family backend.

Constructors, destructors, conversion operators

~IRhiCapabilities() pure virtual

Public functions

auto GetApiVersion(ApiVersion version) const -> std::int32_t pure virtual
Returns the specified API version component.
auto GetInfoStrings() const -> const InfoStrings& pure virtual
Returns the device information strings.
auto GetValue(IntValues valueName) const -> std::int32_t pure virtual
Returns a runtime integer value.
auto GetArrayValue(ArrayIntValues arrayValueName, std::uint32_t index) const -> std::int32_t pure virtual
Returns an element of a runtime integer array value.
auto HasExtension(Extensions extensionName) const -> bool pure virtual
Returns true if the specified OpenGL extension is available.