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 GLInfoStrings
OpenGL information strings.
enum class GLVersion { Major, Minor, Release }
OpenGL version component.
enum class GLIntValues { 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 GLArrayIntValues { PROGRAM_BINARY_FORMATS = 0, Count }
OpenGL queryable runtime integer array value.
enum class GLExtensions { KHR_DEBUG = 0, ARB_TEXTURE_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 GetGLVersion(GLVersion version) const -> std::int32_t pure virtual
Returns the specified OpenGL version component.
auto GetGLInfoStrings() const -> const GLInfoStrings& pure virtual
Returns the OpenGL information strings.
auto GetValue(GLIntValues valueName) const -> std::int32_t pure virtual
Returns a runtime OpenGL integer value.
auto GetArrayValue(GLArrayIntValues arrayValueName, std::uint32_t index) const -> std::int32_t pure virtual
Returns an element of a runtime OpenGL integer array value.
auto HasExtension(GLExtensions extensionName) const -> bool pure virtual
Returns true if the specified OpenGL extension is available.