nCine::IGfxCapabilities class

Interface to query runtime OpenGL device capabilities.

Abstracts access to the version numbers, information strings, integer limits and extension availability flags of the active OpenGL context, so renderer code can adapt to the device without issuing driver queries directly. GfxCapabilities is the concrete implementation.

Derived classes

class GfxCapabilities
Stores and retrieves runtime OpenGL device capabilities.

Public types

struct InfoStrings
OpenGL information strings.
enum class ApiVersion { Major, Minor, Release }
OpenGL 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 }
OpenGL queryable runtime integer value.
enum class ArrayIntValues { PROGRAM_BINARY_FORMATS = 0, Count }
OpenGL 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 }
OpenGL queryable extension.

Constructors, destructors, conversion operators

~IGfxCapabilities() pure virtual

Public functions

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