12#ifndef GAMP_RENDER_GL_GLLITERALS_HPP_
13#define GAMP_RENDER_GL_GLLITERALS_HPP_
22 using namespace jau::enums;
90 case GL_UNSIGNED_BYTE:
91 return "GL_UNSIGNED_BYTE";
94 case GL_UNSIGNED_SHORT:
95 return "GL_UNSIGNED_SHORT";
104 case GL_UNSIGNED_INT:
105 return "GL_UNSIGNED_INT";
120 case GL_VERTEX_ARRAY:
121 return "GL_VERTEX_ARRAY";
122 case GL_NORMAL_ARRAY:
123 return "GL_NORMAL_ARRAY";
125 return "GL_COLOR_ARRAY";
126 case GL_TEXTURE_COORD_ARRAY:
127 return "GL_TEXTURE_COORD_ARRAY";
134 case GL_VERTEX_SHADER:
135 case GL_FRAGMENT_SHADER:
136 case GL_GEOMETRY_SHADER:
137 case GL_TESS_CONTROL_SHADER:
138 case GL_TESS_EVALUATION_SHADER:
139 case GL_COMPUTE_SHADER:
148 case GL_VERTEX_SHADER:
149 return "VERTEX_SHADER";
150 case GL_FRAGMENT_SHADER:
151 return "FRAGMENT_SHADER";
152 case GL_GEOMETRY_SHADER:
153 return "GEOMETRY_SHADER";
154 case GL_TESS_CONTROL_SHADER:
155 return "TESS_CONTROL_SHADER";
156 case GL_TESS_EVALUATION_SHADER:
157 return "TESS_EVALUATION_SHADER";
158 case GL_COMPUTE_SHADER:
159 return "COMPUTE_SHADER";
160 default:
return "UNKNOWN_SHADER";
166 if( 3 == glVersion.
major() ) {
168 }
else if( 2 == glVersion.
major() ) {
171 }
else if( 1 == glVersion.
major() ) {
173 }
else if( 2 == glVersion.
major() ) {
174 switch( glVersion.
minor() ) {
178 }
else if( 3 == glVersion.
major() && 2 >= glVersion.
minor() ) {
179 switch( glVersion.
minor() ) {
189 inline static constexpr std::string_view
mgl_Vertex =
"mgl_Vertex";
190 inline static constexpr std::string_view
mgl_Normal =
"mgl_Normal";
191 inline static constexpr std::string_view
mgl_Color =
"mgl_Color";
201 switch( glArrayIndex ) {
202 case GL_VERTEX_ARRAY:
204 case GL_NORMAL_ARRAY:
208 case GL_TEXTURE_COORD_ARRAY:
209 if( 0 <= multiTexCoordIndex ) {
210 return std::string(
mgl_MultiTexCoord).append(std::to_string(multiTexCoordIndex));
212 return std::string(
mgl_MultiTexCoord).append(std::to_string(multiTexCoordIndex));
Simple version number class containing a version number either being defined explicit or derived from...
constexpr int major() const noexcept
constexpr int minor() const noexcept
constexpr bool has_any(const E mask, const E bits) noexcept
#define JAU_MAKE_BITFIELD_ENUM_STRING(type,...)
GLProfileMask
OpenGL profile-mask bits.
static constexpr jau::util::VersionNumber Version4_3
Version 4.3.
static constexpr jau::util::VersionNumber Version1_4
Version 1.4, i.e.
static constexpr jau::util::VersionNumber Version4_0
Version 4.0.
std::string getPredefinedArrayIndexName(GLenum glArrayIndex, GLint multiTexCoordIndex)
static constexpr jau::util::VersionNumber Version1_10
Version 1.10, i.e.
static constexpr std::string_view mgl_Color
static constexpr jau::util::VersionNumber Version1_30
Version 1.30, i.e.
static constexpr std::string_view mgl_Vertex
static constexpr jau::util::VersionNumber Version1_1
Version 1.1, i.e.
static constexpr GLenum GL_NVIDIA_PLATFORM_BINARY_NV
static constexpr jau::util::VersionNumber Version2_0
Version 2.0.
static constexpr jau::util::VersionNumber Version1_0
Version 1.00, i.e.
constexpr std::string_view getGLTypeName(GLenum type) noexcept
static constexpr jau::util::VersionNumber Version1_50
Version 1.50, i.e.
static constexpr std::string_view mgl_MultiTexCoord
constexpr jau::util::VersionNumber getGLSLVersionNumber(const jau::util::VersionNumber &glVersion, GLProfileMask mask)
constexpr std::string_view shaderTypeString(GLenum type) noexcept
constexpr bool isValidShaderType(GLenum type) noexcept
static constexpr jau::util::VersionNumber Version3_1
Version 3.1.
static constexpr jau::util::VersionNumber Version1_40
Version 1.40, i.e.
static constexpr std::string_view mgl_Normal
static constexpr jau::util::VersionNumber Version1_5
Version 1.5, i.e.
static constexpr jau::util::VersionNumber Version1_20
Version 1.20, i.e.
constexpr std::string_view getGLArrayName(GLenum array) noexcept
static constexpr std::string_view mgl_InterleaveArray
static constexpr jau::util::VersionNumber Version0_0
Version 0.00, i.e.
static constexpr jau::util::VersionNumber Version3_0
Version 3.0.
static constexpr jau::util::VersionNumber Version3_2
Version 3.2.
static constexpr jau::util::VersionNumber Version1_2
Version 1.2, i.e.
@ compat
Desktop compatibility profile.
@ core
Desktop core profile.