Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
Gamp GL Rendering

OpenGL managed rendering support, data handling and GLSL functionality. More...

Classes

class  gamp::render::gl::FBObject
 Core utility class simplifying usage of framebuffer objects (FBO) with all GLProfiles. More...
 
class  gamp::render::gl::GLCapabilities
 Specifies a set of OpenGL capabilities. More...
 
class  gamp::render::gl::GLContext
 OpenGL Rendering Context. More...
 
class  gamp::render::gl::GLProfile
 Specifies the OpenGL profile. More...
 
class  gamp::render::gl::GLVersionNumber
 A class for storing and comparing OpenGL version numbers. More...
 

Typedefs

typedef GLContext gamp::render::gl::GL
 
typedef std::unique_ptr< GLCapabilitiesgamp::render::gl::GLCapabilitiesPtr
 

Enumerations

enum class  gamp::render::gl::GLProfileMask : uint32_t { gamp::render::gl::GLProfileMask::none = 0 , gamp::render::gl::GLProfileMask::compat = 1U << 0 , gamp::render::gl::GLProfileMask::core = 1U << 1 , gamp::render::gl::GLProfileMask::es = 1U << 2 }
 OpenGL profile-mask bits. More...
 

Functions

constexpr std::string_view gamp::render::gl::getGLArrayName (GLenum array) noexcept
 
constexpr jau::util::VersionNumber gamp::render::gl::getGLSLVersionNumber (const jau::util::VersionNumber &glVersion, GLProfileMask mask)
 
constexpr std::string_view gamp::render::gl::getGLTypeName (GLenum type) noexcept
 
std::string gamp::render::gl::getPredefinedArrayIndexName (GLenum glArrayIndex)
 
std::string gamp::render::gl::getPredefinedArrayIndexName (GLenum glArrayIndex, GLint multiTexCoordIndex)
 
template<typename T, std::enable_if_t< std::is_same_v< float, T >, bool > = true>
constexpr GLenum gamp::render::gl::glType () noexcept
 
GLenum gamp::render::gl::glType (const jau::type_info &t) noexcept
 Runtime GL type retrieval using compile-time-type-info (CTTI) jau::type_info.
 
constexpr bool gamp::render::gl::isValidShaderType (GLenum type) noexcept
 
 gamp::render::gl::JAU_MAKE_BITFIELD_ENUM_STRING (GLProfileMask, compat, core, es)
 
constexpr std::string_view gamp::render::gl::shaderTypeString (GLenum type) noexcept
 

Variables

static constexpr GLenum gamp::render::gl::GL_NVIDIA_PLATFORM_BINARY_NV = 0x890B
 
static constexpr std::string_view gamp::render::gl::mgl_Color = "mgl_Color"
 
static constexpr std::string_view gamp::render::gl::mgl_InterleaveArray = "mgl_InterleaveArray"
 
static constexpr std::string_view gamp::render::gl::mgl_MultiTexCoord = "mgl_MultiTexCoord"
 
static constexpr std::string_view gamp::render::gl::mgl_Normal = "mgl_Normal"
 
static constexpr std::string_view gamp::render::gl::mgl_Vertex = "mgl_Vertex"
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version0_0 = jau::util::VersionNumber(0, 0, 0)
 Version 0.00, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_0 = jau::util::VersionNumber(1, 0, 0)
 Version 1.00, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_1 = jau::util::VersionNumber(1, 1, 0)
 Version 1.1, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_10 = jau::util::VersionNumber(1, 10, 0)
 Version 1.10, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_2 = jau::util::VersionNumber(1, 2, 0)
 Version 1.2, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_20 = jau::util::VersionNumber(1, 20, 0)
 Version 1.20, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_30 = jau::util::VersionNumber(1, 30, 0)
 Version 1.30, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_4 = jau::util::VersionNumber(1, 4, 0)
 Version 1.4, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_40 = jau::util::VersionNumber(1, 40, 0)
 Version 1.40, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_5 = jau::util::VersionNumber(1, 5, 0)
 Version 1.5, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version1_50 = jau::util::VersionNumber(1, 50, 0)
 Version 1.50, i.e.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version2_0 = jau::util::VersionNumber(2, 0, 0)
 Version 2.0.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version3_0 = jau::util::VersionNumber(3, 0, 0)
 Version 3.0.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version3_1 = jau::util::VersionNumber(3, 1, 0)
 Version 3.1.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version3_2 = jau::util::VersionNumber(3, 2, 0)
 Version 3.2.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version4_0 = jau::util::VersionNumber(4, 0, 0)
 Version 4.0.
 
static constexpr jau::util::VersionNumber gamp::render::gl::Version4_3 = jau::util::VersionNumber(4, 3, 0)
 Version 4.3.
 

Detailed Description

OpenGL managed rendering support, data handling and GLSL functionality.

Typedef Documentation

◆ GLCapabilitiesPtr

Definition at line 427 of file GLCapabilities.hpp.

◆ GL

Enumeration Type Documentation

◆ GLProfileMask

enum class gamp::render::gl::GLProfileMask : uint32_t
strong

OpenGL profile-mask bits.

Enumerator
none 
compat 

Desktop compatibility profile.

core 

Desktop core profile.

es 

ES profile.

Definition at line 77 of file GLLiterals.hpp.

Function Documentation

◆ JAU_MAKE_BITFIELD_ENUM_STRING()

gamp::render::gl::JAU_MAKE_BITFIELD_ENUM_STRING ( GLProfileMask ,
compat ,
core ,
es  )

◆ getGLTypeName()

std::string_view gamp::render::gl::getGLTypeName ( GLenum type)
constexprnoexcept

Definition at line 88 of file GLLiterals.hpp.

◆ getGLArrayName()

std::string_view gamp::render::gl::getGLArrayName ( GLenum array)
constexprnoexcept

Definition at line 118 of file GLLiterals.hpp.

Here is the caller graph for this function:

◆ isValidShaderType()

bool gamp::render::gl::isValidShaderType ( GLenum type)
constexprnoexcept

Definition at line 132 of file GLLiterals.hpp.

Here is the caller graph for this function:

◆ shaderTypeString()

std::string_view gamp::render::gl::shaderTypeString ( GLenum type)
constexprnoexcept

Definition at line 146 of file GLLiterals.hpp.

Here is the caller graph for this function:

◆ getGLSLVersionNumber()

jau::util::VersionNumber gamp::render::gl::getGLSLVersionNumber ( const jau::util::VersionNumber & glVersion,
GLProfileMask mask )
constexpr

Definition at line 164 of file GLLiterals.hpp.

◆ getPredefinedArrayIndexName() [1/2]

std::string gamp::render::gl::getPredefinedArrayIndexName ( GLenum glArrayIndex,
GLint multiTexCoordIndex )
inline
Parameters
glArrayIndexthe fixed function array index
multiTexCoordIndexindex for multiTexCoordIndex
Returns
default fixed function array name

Definition at line 200 of file GLLiterals.hpp.

Here is the caller graph for this function:

◆ getPredefinedArrayIndexName() [2/2]

std::string gamp::render::gl::getPredefinedArrayIndexName ( GLenum glArrayIndex)
inline
Parameters
glArrayIndexthe fixed function array index
Returns
default fixed function array name

Definition at line 221 of file GLLiterals.hpp.

◆ glType() [1/2]

template<typename T, std::enable_if_t< std::is_same_v< float, T >, bool > = true>
GLenum gamp::render::gl::glType ( )
constexprnoexcept

Definition at line 46 of file GLTypes.hpp.

Here is the caller graph for this function:

◆ glType() [2/2]

GLenum gamp::render::gl::glType ( const jau::type_info & t)
inlinenoexcept

Runtime GL type retrieval using compile-time-type-info (CTTI) jau::type_info.

Returns GL_NONE if type is not supported.

Definition at line 74 of file GLTypes.hpp.

Variable Documentation

◆ GL_NVIDIA_PLATFORM_BINARY_NV

GLenum gamp::render::gl::GL_NVIDIA_PLATFORM_BINARY_NV = 0x890B
inlinestaticconstexpr

Definition at line 29 of file GLLiterals.hpp.

◆ Version0_0

jau::util::VersionNumber gamp::render::gl::Version0_0 = jau::util::VersionNumber(0, 0, 0)
inlinestaticconstexpr

Version 0.00, i.e.

invalid or undefined version.

Definition at line 32 of file GLLiterals.hpp.

◆ Version1_0

jau::util::VersionNumber gamp::render::gl::Version1_0 = jau::util::VersionNumber(1, 0, 0)
inlinestaticconstexpr

Version 1.00, i.e.

GLSL 1.00 for ES 2.0.

Definition at line 34 of file GLLiterals.hpp.

◆ Version1_10

jau::util::VersionNumber gamp::render::gl::Version1_10 = jau::util::VersionNumber(1, 10, 0)
inlinestaticconstexpr

Version 1.10, i.e.

GLSL 1.10 for GL 2.0.

Definition at line 36 of file GLLiterals.hpp.

◆ Version1_20

jau::util::VersionNumber gamp::render::gl::Version1_20 = jau::util::VersionNumber(1, 20, 0)
inlinestaticconstexpr

Version 1.20, i.e.

GLSL 1.20 for GL 2.1.

Definition at line 38 of file GLLiterals.hpp.

◆ Version1_30

jau::util::VersionNumber gamp::render::gl::Version1_30 = jau::util::VersionNumber(1, 30, 0)
inlinestaticconstexpr

Version 1.30, i.e.

GLSL 1.30 for GL 3.0.

Definition at line 40 of file GLLiterals.hpp.

◆ Version1_40

jau::util::VersionNumber gamp::render::gl::Version1_40 = jau::util::VersionNumber(1, 40, 0)
inlinestaticconstexpr

Version 1.40, i.e.

GLSL 1.40 for GL 3.1.

Definition at line 42 of file GLLiterals.hpp.

◆ Version1_50

jau::util::VersionNumber gamp::render::gl::Version1_50 = jau::util::VersionNumber(1, 50, 0)
inlinestaticconstexpr

Version 1.50, i.e.

GLSL 1.50 for GL 3.2.

Definition at line 44 of file GLLiterals.hpp.

◆ Version1_1

jau::util::VersionNumber gamp::render::gl::Version1_1 = jau::util::VersionNumber(1, 1, 0)
inlinestaticconstexpr

Version 1.1, i.e.

GL 1.1

Definition at line 47 of file GLLiterals.hpp.

◆ Version1_2

jau::util::VersionNumber gamp::render::gl::Version1_2 = jau::util::VersionNumber(1, 2, 0)
inlinestaticconstexpr

Version 1.2, i.e.

GL 1.2

Definition at line 50 of file GLLiterals.hpp.

◆ Version1_4

jau::util::VersionNumber gamp::render::gl::Version1_4 = jau::util::VersionNumber(1, 4, 0)
inlinestaticconstexpr

Version 1.4, i.e.

GL 1.4

Definition at line 53 of file GLLiterals.hpp.

◆ Version1_5

jau::util::VersionNumber gamp::render::gl::Version1_5 = jau::util::VersionNumber(1, 5, 0)
inlinestaticconstexpr

Version 1.5, i.e.

GL 1.5

Definition at line 56 of file GLLiterals.hpp.

◆ Version2_0

jau::util::VersionNumber gamp::render::gl::Version2_0 = jau::util::VersionNumber(2, 0, 0)
inlinestaticconstexpr

Version 2.0.

As an OpenGL version, it qualifies for desktop isGL2() only, or ES 2.0.

Definition at line 59 of file GLLiterals.hpp.

◆ Version3_0

jau::util::VersionNumber gamp::render::gl::Version3_0 = jau::util::VersionNumber(3, 0, 0)
inlinestaticconstexpr

Version 3.0.

As an OpenGL version, it qualifies for desktop isGL2() only, or ES 3.0. Or GLSL 3.00 for ES 3.0.

Definition at line 62 of file GLLiterals.hpp.

◆ Version3_1

jau::util::VersionNumber gamp::render::gl::Version3_1 = jau::util::VersionNumber(3, 1, 0)
inlinestaticconstexpr

Version 3.1.

As an OpenGL version, it qualifies for isGL3core(), isGL3bc() and isGL3()

Definition at line 65 of file GLLiterals.hpp.

◆ Version3_2

jau::util::VersionNumber gamp::render::gl::Version3_2 = jau::util::VersionNumber(3, 2, 0)
inlinestaticconstexpr

Version 3.2.

As an OpenGL version, it qualifies for geometry shader

Definition at line 68 of file GLLiterals.hpp.

◆ Version4_0

jau::util::VersionNumber gamp::render::gl::Version4_0 = jau::util::VersionNumber(4, 0, 0)
inlinestaticconstexpr

Version 4.0.

As an OpenGL version.

Definition at line 71 of file GLLiterals.hpp.

◆ Version4_3

jau::util::VersionNumber gamp::render::gl::Version4_3 = jau::util::VersionNumber(4, 3, 0)
inlinestaticconstexpr

Version 4.3.

As an OpenGL version, it qualifies for GL_ARB_ES3_compatibility

Definition at line 74 of file GLLiterals.hpp.

◆ mgl_Vertex

std::string_view gamp::render::gl::mgl_Vertex = "mgl_Vertex"
inlinestaticconstexpr

Definition at line 189 of file GLLiterals.hpp.

◆ mgl_Normal

std::string_view gamp::render::gl::mgl_Normal = "mgl_Normal"
inlinestaticconstexpr

Definition at line 190 of file GLLiterals.hpp.

◆ mgl_Color

std::string_view gamp::render::gl::mgl_Color = "mgl_Color"
inlinestaticconstexpr

Definition at line 191 of file GLLiterals.hpp.

◆ mgl_MultiTexCoord

std::string_view gamp::render::gl::mgl_MultiTexCoord = "mgl_MultiTexCoord"
inlinestaticconstexpr

Definition at line 192 of file GLLiterals.hpp.

◆ mgl_InterleaveArray

std::string_view gamp::render::gl::mgl_InterleaveArray = "mgl_InterleaveArray"
inlinestaticconstexpr

Definition at line 193 of file GLLiterals.hpp.