Enum Reference

All enums live in include/metagl/Enums.hpp and the metagl namespace. Every enumerator has a generated metagl::to_string() overload in EnumNames.hpp used by the debug logger. Tags show minimum ES version.

ClearBufferBit : GLbitfield

Bitmask passed to glClear(). Supports operator|.

EnumeratorGL constantMeaning
ColorGL_COLOR_BUFFER_BITClear the colour buffer
DepthGL_DEPTH_BUFFER_BITClear the depth buffer
StencilGL_STENCIL_BUFFER_BITClear the stencil buffer

Capability : GLenum

Server-side capabilities toggled with glEnable() / glDisable().

EnumeratorGL constantES
BlendGL_BLEND2.0
CullFaceGL_CULL_FACE2.0
DepthTestGL_DEPTH_TEST2.0
DitherGL_DITHER2.0
PolygonOffsetFillGL_POLYGON_OFFSET_FILL2.0
SampleAlphaToCoverageGL_SAMPLE_ALPHA_TO_COVERAGE2.0
SampleCoverageGL_SAMPLE_COVERAGE2.0
ScissorTestGL_SCISSOR_TEST2.0
StencilTestGL_STENCIL_TEST2.0
RasterizerDiscardGL_RASTERIZER_DISCARD3.0
PrimitiveRestartFixedIndexGL_PRIMITIVE_RESTART_FIXED_INDEX3.0
SampleMaskGL_SAMPLE_MASK3.1
DebugOutputGL_DEBUG_OUTPUT3.2
DebugOutputSynchronousGL_DEBUG_OUTPUT_SYNCHRONOUS3.2
SampleShadingGL_SAMPLE_SHADING3.2

BlendFactor : GLenum

Source and destination blend factors for glBlendFunc() / glBlendFunci().

EnumeratorGL constant
ZeroGL_ZERO
OneGL_ONE
SrcColorGL_SRC_COLOR
OneMinusSrcColorGL_ONE_MINUS_SRC_COLOR
SrcAlphaGL_SRC_ALPHA
OneMinusSrcAlphaGL_ONE_MINUS_SRC_ALPHA
DstAlphaGL_DST_ALPHA
OneMinusDstAlphaGL_ONE_MINUS_DST_ALPHA
DstColorGL_DST_COLOR
OneMinusDstColorGL_ONE_MINUS_DST_COLOR
SrcAlphaSaturateGL_SRC_ALPHA_SATURATE
ConstantColorGL_CONSTANT_COLOR
OneMinusConstantColorGL_ONE_MINUS_CONSTANT_COLOR
ConstantAlphaGL_CONSTANT_ALPHA
OneMinusConstantAlphaGL_ONE_MINUS_CONSTANT_ALPHA

BlendEquation : GLenum

Blend equation mode for glBlendEquation().

EnumeratorGL constant
FuncAddGL_FUNC_ADD
FuncSubtractGL_FUNC_SUBTRACT
FuncReverseSubtractGL_FUNC_REVERSE_SUBTRACT
MinGL_MIN
MaxGL_MAX
Multiply / Screen / Overlay / …KHR_blend_equation_advanced

CompareFunc : GLenum

Comparison function for depth, stencil, and shadow samplers.

EnumeratorGL constantPasses when
NeverGL_NEVERNever
LessGL_LESSincoming < reference
EqualGL_EQUALincoming = reference
LequalGL_LEQUALincoming ≤ reference
GreaterGL_GREATERincoming > reference
NotequalGL_NOTEQUALincoming ≠ reference
GequalGL_GEQUALincoming ≥ reference
AlwaysGL_ALWAYSAlways

StencilOp : GLenum

EnumeratorGL constantAction
KeepGL_KEEPKeep current value
ZeroGL_ZEROSet to 0
ReplaceGL_REPLACESet to reference value
IncrGL_INCRClamp increment
DecrGL_DECRClamp decrement
InvertGL_INVERTBitwise invert
IncrWrapGL_INCR_WRAPWrapping increment
DecrWrapGL_DECR_WRAPWrapping decrement

CullFace : GLenum

EnumeratorGL constant
FrontGL_FRONT
BackGL_BACK
FrontAndBackGL_FRONT_AND_BACK

FrontFace : GLenum

EnumeratorGL constantMeaning
CWGL_CWClockwise winding = front face
CCWGL_CCWCounter-clockwise = front face (default)

PrimitiveType : GLenum

Primitive topology for glDrawArrays(), glDrawElements(), etc.

EnumeratorES
Points2.0
Lines / LineLoop / LineStrip2.0
Triangles / TriangleStrip / TriangleFan2.0
LinesAdjacency / LineStripAdjacency3.2 geometry shader
TrianglesAdjacency / TriangleStripAdjacency3.2 geometry shader
Patches3.2 tessellation

DataType : GLenum

Scalar types for vertex attributes, index buffers, and uniforms.

EnumeratorGL constantES
Byte / UnsignedByteGL_BYTE / GL_UNSIGNED_BYTE2.0
Short / UnsignedShortGL_SHORT / GL_UNSIGNED_SHORT2.0
Int / UnsignedIntGL_INT / GL_UNSIGNED_INT2.0
FloatGL_FLOAT2.0
HalfFloatGL_HALF_FLOAT3.0
Int2101010Rev / UnsignedInt2101010Revpacked3.0
UnsignedInt10F11F11FRevGL_UNSIGNED_INT_10F_11F_11F_REV3.0

BufferTarget : GLenum

Buffer object binding targets.

EnumeratorGL constantUseES
ArrayGL_ARRAY_BUFFERVertex attribute data2.0
ElementArrayGL_ELEMENT_ARRAY_BUFFERIndex data2.0
CopyRead / CopyWriteGL_COPY_READ/WRITE_BUFFERGPU buffer copies3.0
PixelPack / PixelUnpackGL_PIXEL_PACK/UNPACK_BUFFERPixel transfer3.0
UniformGL_UNIFORM_BUFFERUniform blocks3.0
TransformFeedbackGL_TRANSFORM_FEEDBACK_BUFFERTF output3.0
DrawIndirect / DispatchIndirectGL_DRAW/DISPATCH_INDIRECT_BUFFERIndirect draw/dispatch3.1
ShaderStorageGL_SHADER_STORAGE_BUFFERSSBO data3.1
AtomicCounterGL_ATOMIC_COUNTER_BUFFERAtomic counters3.1

BufferUsage : GLenum

Hint passed to glBufferData(). Three access patterns (Stream/Static/Dynamic) × three data flow directions (Draw/Read/Copy).

EnumeratorGL constantPattern
StreamDrawGL_STREAM_DRAWWritten once, drawn a few times
StreamReadGL_STREAM_READWritten by GL, read by app a few times
StreamCopyGL_STREAM_COPYWritten by GL, used as GL source a few times
StaticDrawGL_STATIC_DRAWWritten once, drawn many times
StaticReadGL_STATIC_READWritten by GL, read by app many times
StaticCopyGL_STATIC_COPYWritten by GL, used as GL source many times
DynamicDrawGL_DYNAMIC_DRAWWritten repeatedly, drawn many times
DynamicReadGL_DYNAMIC_READWritten by GL, read by app repeatedly
DynamicCopyGL_DYNAMIC_COPYWritten by GL, used as GL source repeatedly

MapBufferAccessMask : GLbitfield

Flags for glMapBufferRange(). Supports operator|.

EnumeratorGL constantMeaning
ReadGL_MAP_READ_BITCPU will read mapped data
WriteGL_MAP_WRITE_BITCPU will write mapped data
InvalidateRangeGL_MAP_INVALIDATE_RANGE_BITInvalidate the mapped range
InvalidateBufferGL_MAP_INVALIDATE_BUFFER_BITInvalidate the whole buffer
FlushExplicitGL_MAP_FLUSH_EXPLICIT_BITApp calls glFlushMappedBufferRange
UnsynchronizedGL_MAP_UNSYNCHRONIZED_BITNo GL sync on map

TextureTarget : GLenum

EnumeratorES
Texture2D2.0
TextureCubeMap + 6 face targets2.0
Texture3D / Texture2DArray3.0
Texture2DMultisample3.1
TextureBuffer / TextureCubeMapArray / Texture2DMultisampleArray3.2

TextureMinFilter : GLenum

EnumeratorGL constant
NearestGL_NEAREST
LinearGL_LINEAR
NearestMipmapNearestGL_NEAREST_MIPMAP_NEAREST
LinearMipmapNearestGL_LINEAR_MIPMAP_NEAREST
NearestMipmapLinearGL_NEAREST_MIPMAP_LINEAR
LinearMipmapLinearGL_LINEAR_MIPMAP_LINEAR

TextureMagFilter : GLenum

EnumeratorGL constant
NearestGL_NEAREST
LinearGL_LINEAR

TextureWrapMode : GLenum

EnumeratorGL constantES
RepeatGL_REPEAT2.0
ClampToEdgeGL_CLAMP_TO_EDGE2.0
MirroredRepeatGL_MIRRORED_REPEAT2.0
ClampToBorderGL_CLAMP_TO_BORDER3.2

InternalFormat : GLenum

Sized and unsized internal formats for glTexImage*() and glRenderbufferStorage(). Includes base unsized (ES 2.0), sized colour (ES 3.0), and depth/stencil variants.

CategoryExamplesES
Base unsizedRgba, Rgb, Alpha, Luminance2.0
Sized 8-bitRgba8, Rgb8, R8, Rg83.0
Sized floatRgba16F, Rgba32F, R16F, R32F3.0
Sized integerRgba8UI, Rgba8I, Rgb32I3.0
sRGBSrgb8, Srgb8Alpha83.0
PackedR11FG11FB10F, Rgb9E5, Rgb10A23.0
Depth/stencilDepthComponent24/32F, Depth24Stencil83.0

CompressedInternalFormat : GLenum

ETC2/EAC (required ES 3.0) and ASTC LDR (ES 3.2) compressed texture formats.

CategoryExamplesES
EAC single channelR11Eac, SignedR11Eac, Rg11Eac3.0
ETC2 RGB/RGBARgb8Etc2, Rgba8Etc2Eac, Srgb8Etc23.0
ASTC LDR (4×4 … 12×12)RgbaAstc4x4 … RgbaAstc12x123.2
ASTC sRGBSrgb8Alpha8Astc4x4 … Srgb8Alpha8Astc12x123.2

ShaderType : GLenum

EnumeratorGL constantES
VertexGL_VERTEX_SHADER2.0
FragmentGL_FRAGMENT_SHADER2.0
ComputeGL_COMPUTE_SHADER3.1
GeometryGL_GEOMETRY_SHADER3.2
TessControlGL_TESS_CONTROL_SHADER3.2
TessEvaluationGL_TESS_EVALUATION_SHADER3.2

ShaderStageMask : GLbitfield

Bitfield for glUseProgramStages() (separable programs). Supports operator|.

EnumeratorES
Vertex / Fragment2.0
Compute3.1
Geometry / TessControl / TessEvaluation3.2
AllShaderBitsall stages

UniformType : GLenum

Returned by glGetActiveUniform(). Covers scalars, vectors, matrices, samplers, images, and atomics.

CategoryExamplesES
ScalarsFloat, Int, UnsignedInt, Bool2.0
VectorsFloatVec2/3/4, IntVec2/3/4, BoolVec2/3/42.0
MatricesFloatMat2/3/4, FloatMat2x3, FloatMat3x4, …2.0
SamplersSampler2D, Sampler3D, SamplerCube, Sampler2DArray, …2.0
Shadow samplersSampler2DShadow, SamplerCubeShadow, …2.0
MultisampleSampler2DMultisample, IntSampler2DMultisample3.1
Image typesImage2D, Image3D, ImageCube, IntImage2D, …3.1
Atomic counterUnsignedIntAtomicCounter3.1
Buffer/CubeArray/MS ArraySamplerBuffer, SamplerCubeMapArray, …3.2

FramebufferTarget : GLenum

EnumeratorGL constantES
FramebufferGL_FRAMEBUFFER2.0
DrawFramebufferGL_DRAW_FRAMEBUFFER3.0
ReadFramebufferGL_READ_FRAMEBUFFER3.0

FramebufferAttachment : GLenum

Color0–Color31, Depth, Stencil, DepthStencil attachment points.

FramebufferStatus : GLenum

Return value of glCheckFramebufferStatus().

EnumeratorMeaningES
CompleteFramebuffer is complete and renderable2.0
UndefinedDefault framebuffer, no surface3.0
IncompleteAttachmentAt least one attachment is incomplete2.0
IncompleteMissingAttachmentNo attachments at all2.0
IncompleteDimensionsAttachments differ in size2.0
UnsupportedFormat combination not supported2.0
IncompleteMultisampleInconsistent sample counts3.0
IncompleteLayerTargetsLayered/non-layered mismatch3.2

DebugSource / DebugType / DebugSeverity : GLenum

Used with glDebugMessageControl() and the debug callback. All are ES 3.2+.

DebugSourceDebugTypeDebugSeverity
Api, WindowSystem, ShaderCompiler, ThirdParty, Application, Other, DontCare Error, DeprecatedBehavior, UndefinedBehavior, Portability, Performance, Marker, PushGroup, PopGroup, Other High, Medium, Low, Notification, DontCare