Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
gamp::render::gl::GLVersionNumber Class Reference

A class for storing and comparing OpenGL version numbers. More...

#include <GLVersionNum.hpp>

Inheritance diagram for gamp::render::gl::GLVersionNumber:
Collaboration diagram for gamp::render::gl::GLVersionNumber:

Public Member Functions

 GLVersionNumber () noexcept
 
VersionNumber createVendorVersion (const std::string &versionString) noexcept
 Returns the optional vendor version at the end of the GL_VERSION string if exists, otherwise the zero version instance.
 
constexpr bool isValid () const noexcept
 
- Public Member Functions inherited from jau::util::VersionNumberString
constexpr VersionNumberString () noexcept
 Default ctor for zero version.
 
 VersionNumberString (const std::string &versionString) noexcept
 String derived version number instantiation.
 
 VersionNumberString (const std::string &versionString, const std::regex &versionPattern) noexcept
 String derived version number instantiation.
 
 VersionNumberString (const std::string &versionString, const std::string &delim) noexcept
 String derived version number instantiation.
 
 VersionNumberString (const VersionNumberString &) noexcept=default
 
 VersionNumberString (VersionNumberString &&) noexcept=default
 
constexpr ssize_t endOfStringMatch () const noexcept
 If constructed with version-string, returns the string offset after the last matching character, or 0 if none matched, or -1 if not constructed with a string.
 
constexpr bool hasString () const noexcept
 Returns true if constructed with a version-string, otherwise false.
 
VersionNumberStringoperator= (const VersionNumberString &) noexcept=default
 
VersionNumberStringoperator= (VersionNumberString &&) noexcept=default
 
std::string toString () const noexcept
 
constexpr const std::string & versionString () const noexcept
 Returns the used version-string, empty if not constructed with such.
 
- Public Member Functions inherited from jau::util::VersionNumber
constexpr VersionNumber () noexcept
 Default ctor for zero version.
 
constexpr VersionNumber (const VersionNumber &) noexcept=default
 
constexpr VersionNumber (int majorRev, int minorRev, int subMinorRev) noexcept
 Explicit version number instantiation, with all components defined explicitly excluding git.
 
constexpr VersionNumber (int majorRev, int minorRev, int subMinorRev, int gitCommits, uint64_t gitSSHA, bool gitDirty) noexcept
 Explicit version number instantiation, with all components defined explicitly including git.
 
constexpr VersionNumber (VersionNumber &&) noexcept=default
 
constexpr int git_commits () const noexcept
 
constexpr bool git_dirty () const noexcept
 
constexpr uint64_t git_ssha () const noexcept
 
constexpr bool hasGitInfo () const noexcept
 Returns true, if the optional git information is defined explicitly, otherwise false.
 
constexpr std::size_t hash () const noexcept
 
constexpr bool hasMajor () const noexcept
 Returns true, if the major component is defined explicitly, otherwise false.
 
constexpr bool hasMinor () const noexcept
 Returns true, if the optional minor component is defined explicitly, otherwise false.
 
constexpr bool hasSub () const noexcept
 Returns true, if the optional sub component is defined explicitly, otherwise false.
 
constexpr bool isZero () const noexcept
 Returns true, if all version components are zero, otherwise false.
 
constexpr int major () const noexcept
 
constexpr int minor () const noexcept
 
constexpr std::strong_ordering operator<=> (const VersionNumber &vo) const noexcept
 Three way std::strong_ordering comparison operator.
 
constexpr VersionNumberoperator= (const VersionNumber &) noexcept=default
 
constexpr VersionNumberoperator= (VersionNumber &&) noexcept=default
 
constexpr bool operator== (const VersionNumber &vo) const noexcept
 Two way comparison operator.
 
constexpr int sub () const noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

static GLVersionNumber create (const std::string &versionString) noexcept
 
- Static Public Member Functions inherited from jau::util::VersionNumberString
static const std::regex & getDefaultPattern () noexcept
 
static std::regex getGitPattern (const std::string &delim)
 
static std::regex getNonGitPattern (const std::string &delim)
 

Additional Inherited Members

- Protected Member Functions inherited from jau::util::VersionNumberString
constexpr VersionNumberString (int majorRev, int minorRev, int subMinorRev, int gitCommits, uint64_t gitSSHA, bool gitDirty, uint16_t _state, ssize_t strEnd, std::string _version_str) noexcept
 
- Protected Member Functions inherited from jau::util::VersionNumber
constexpr VersionNumber (int majorRev, int minorRev, int subMinorRev, int gitCommits, uint64_t gitSSHA, bool gitDirty, uint16_t _state) noexcept
 
- Protected Attributes inherited from jau::util::VersionNumber
int m_git_commits
 
bool m_git_dirty
 
uint64_t m_git_ssha
 
int m_major
 
int m_minor
 
uint16_t m_state
 
int m_sub
 
- Static Protected Attributes inherited from jau::util::VersionNumber
static constexpr const bool DBG_OUT = false
 
static constexpr const uint16_t HAS_GIT_INFO = 1U << 3
 
static constexpr const uint16_t HAS_MAJOR = 1U << 0
 
static constexpr const uint16_t HAS_MINOR = 1U << 1
 
static constexpr const uint16_t HAS_SUB = 1U << 2
 

Detailed Description

A class for storing and comparing OpenGL version numbers.

This only works for desktop OpenGL at the moment.

Definition at line 28 of file GLVersionNum.hpp.

Constructor & Destructor Documentation

◆ GLVersionNumber()

gamp::render::gl::GLVersionNumber::GLVersionNumber ( )
inlinenoexcept

Definition at line 49 of file GLVersionNum.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ create()

static GLVersionNumber gamp::render::gl::GLVersionNumber::create ( const std::string & versionString)
inlinestaticnoexcept

Definition at line 51 of file GLVersionNum.hpp.

Here is the caller graph for this function:

◆ isValid()

bool gamp::render::gl::GLVersionNumber::isValid ( ) const
inlineconstexprnoexcept

Definition at line 74 of file GLVersionNum.hpp.

◆ createVendorVersion()

VersionNumber gamp::render::gl::GLVersionNumber::createVendorVersion ( const std::string & versionString)
inlinenoexcept

Returns the optional vendor version at the end of the GL_VERSION string if exists, otherwise the zero version instance.

  2.1 Mesa 7.0.3-rc2 -> 7.0.3 (7.0.3-rc2)
  2.1 Mesa 7.12-devel (git-d6c318e) -> 7.12.0 (7.12-devel)
  4.2.12171 Compatibility Profile Context 9.01.8 -> 9.1.8 (9.01.8)
  4.2.12198 Compatibility Profile Context 12.102.3.0 -> 12.102.3 (12.102.3.0)
  4.3.0 NVIDIA 310.32 -> 310.32 (310.32)

Definition at line 89 of file GLVersionNum.hpp.


The documentation for this class was generated from the following file: