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|.
| Enumerator | GL constant | Meaning |
| Color | GL_COLOR_BUFFER_BIT | Clear the colour buffer |
| Depth | GL_DEPTH_BUFFER_BIT | Clear the depth buffer |
| Stencil | GL_STENCIL_BUFFER_BIT | Clear the stencil buffer |
Capability : GLenum
Server-side capabilities toggled with glEnable() / glDisable().
| Enumerator | GL constant | ES |
| Blend | GL_BLEND | 2.0 |
| CullFace | GL_CULL_FACE | 2.0 |
| DepthTest | GL_DEPTH_TEST | 2.0 |
| Dither | GL_DITHER | 2.0 |
| PolygonOffsetFill | GL_POLYGON_OFFSET_FILL | 2.0 |
| SampleAlphaToCoverage | GL_SAMPLE_ALPHA_TO_COVERAGE | 2.0 |
| SampleCoverage | GL_SAMPLE_COVERAGE | 2.0 |
| ScissorTest | GL_SCISSOR_TEST | 2.0 |
| StencilTest | GL_STENCIL_TEST | 2.0 |
| RasterizerDiscard | GL_RASTERIZER_DISCARD | 3.0 |
| PrimitiveRestartFixedIndex | GL_PRIMITIVE_RESTART_FIXED_INDEX | 3.0 |
| SampleMask | GL_SAMPLE_MASK | 3.1 |
| DebugOutput | GL_DEBUG_OUTPUT | 3.2 |
| DebugOutputSynchronous | GL_DEBUG_OUTPUT_SYNCHRONOUS | 3.2 |
| SampleShading | GL_SAMPLE_SHADING | 3.2 |
BlendFactor : GLenum
Source and destination blend factors for glBlendFunc() / glBlendFunci().
| Enumerator | GL constant |
| Zero | GL_ZERO |
| One | GL_ONE |
| SrcColor | GL_SRC_COLOR |
| OneMinusSrcColor | GL_ONE_MINUS_SRC_COLOR |
| SrcAlpha | GL_SRC_ALPHA |
| OneMinusSrcAlpha | GL_ONE_MINUS_SRC_ALPHA |
| DstAlpha | GL_DST_ALPHA |
| OneMinusDstAlpha | GL_ONE_MINUS_DST_ALPHA |
| DstColor | GL_DST_COLOR |
| OneMinusDstColor | GL_ONE_MINUS_DST_COLOR |
| SrcAlphaSaturate | GL_SRC_ALPHA_SATURATE |
| ConstantColor | GL_CONSTANT_COLOR |
| OneMinusConstantColor | GL_ONE_MINUS_CONSTANT_COLOR |
| ConstantAlpha | GL_CONSTANT_ALPHA |
| OneMinusConstantAlpha | GL_ONE_MINUS_CONSTANT_ALPHA |
BlendEquation : GLenum
Blend equation mode for glBlendEquation().
| Enumerator | GL constant |
| FuncAdd | GL_FUNC_ADD |
| FuncSubtract | GL_FUNC_SUBTRACT |
| FuncReverseSubtract | GL_FUNC_REVERSE_SUBTRACT |
| Min | GL_MIN |
| Max | GL_MAX |
| Multiply / Screen / Overlay / … | KHR_blend_equation_advanced |
CompareFunc : GLenum
Comparison function for depth, stencil, and shadow samplers.
| Enumerator | GL constant | Passes when |
| Never | GL_NEVER | Never |
| Less | GL_LESS | incoming < reference |
| Equal | GL_EQUAL | incoming = reference |
| Lequal | GL_LEQUAL | incoming ≤ reference |
| Greater | GL_GREATER | incoming > reference |
| Notequal | GL_NOTEQUAL | incoming ≠ reference |
| Gequal | GL_GEQUAL | incoming ≥ reference |
| Always | GL_ALWAYS | Always |
StencilOp : GLenum
| Enumerator | GL constant | Action |
| Keep | GL_KEEP | Keep current value |
| Zero | GL_ZERO | Set to 0 |
| Replace | GL_REPLACE | Set to reference value |
| Incr | GL_INCR | Clamp increment |
| Decr | GL_DECR | Clamp decrement |
| Invert | GL_INVERT | Bitwise invert |
| IncrWrap | GL_INCR_WRAP | Wrapping increment |
| DecrWrap | GL_DECR_WRAP | Wrapping decrement |
CullFace : GLenum
| Enumerator | GL constant |
| Front | GL_FRONT |
| Back | GL_BACK |
| FrontAndBack | GL_FRONT_AND_BACK |
FrontFace : GLenum
| Enumerator | GL constant | Meaning |
| CW | GL_CW | Clockwise winding = front face |
| CCW | GL_CCW | Counter-clockwise = front face (default) |
PrimitiveType : GLenum
Primitive topology for glDrawArrays(), glDrawElements(), etc.
| Enumerator | ES |
| Points | 2.0 |
| Lines / LineLoop / LineStrip | 2.0 |
| Triangles / TriangleStrip / TriangleFan | 2.0 |
| LinesAdjacency / LineStripAdjacency | 3.2 geometry shader |
| TrianglesAdjacency / TriangleStripAdjacency | 3.2 geometry shader |
| Patches | 3.2 tessellation |
DataType : GLenum
Scalar types for vertex attributes, index buffers, and uniforms.
| Enumerator | GL constant | ES |
| Byte / UnsignedByte | GL_BYTE / GL_UNSIGNED_BYTE | 2.0 |
| Short / UnsignedShort | GL_SHORT / GL_UNSIGNED_SHORT | 2.0 |
| Int / UnsignedInt | GL_INT / GL_UNSIGNED_INT | 2.0 |
| Float | GL_FLOAT | 2.0 |
| HalfFloat | GL_HALF_FLOAT | 3.0 |
| Int2101010Rev / UnsignedInt2101010Rev | packed | 3.0 |
| UnsignedInt10F11F11FRev | GL_UNSIGNED_INT_10F_11F_11F_REV | 3.0 |
BufferTarget : GLenum
Buffer object binding targets.
| Enumerator | GL constant | Use | ES |
| Array | GL_ARRAY_BUFFER | Vertex attribute data | 2.0 |
| ElementArray | GL_ELEMENT_ARRAY_BUFFER | Index data | 2.0 |
| CopyRead / CopyWrite | GL_COPY_READ/WRITE_BUFFER | GPU buffer copies | 3.0 |
| PixelPack / PixelUnpack | GL_PIXEL_PACK/UNPACK_BUFFER | Pixel transfer | 3.0 |
| Uniform | GL_UNIFORM_BUFFER | Uniform blocks | 3.0 |
| TransformFeedback | GL_TRANSFORM_FEEDBACK_BUFFER | TF output | 3.0 |
| DrawIndirect / DispatchIndirect | GL_DRAW/DISPATCH_INDIRECT_BUFFER | Indirect draw/dispatch | 3.1 |
| ShaderStorage | GL_SHADER_STORAGE_BUFFER | SSBO data | 3.1 |
| AtomicCounter | GL_ATOMIC_COUNTER_BUFFER | Atomic counters | 3.1 |
BufferUsage : GLenum
Hint passed to glBufferData(). Three access patterns (Stream/Static/Dynamic) × three data flow directions (Draw/Read/Copy).
| Enumerator | GL constant | Pattern |
| StreamDraw | GL_STREAM_DRAW | Written once, drawn a few times |
| StreamRead | GL_STREAM_READ | Written by GL, read by app a few times |
| StreamCopy | GL_STREAM_COPY | Written by GL, used as GL source a few times |
| StaticDraw | GL_STATIC_DRAW | Written once, drawn many times |
| StaticRead | GL_STATIC_READ | Written by GL, read by app many times |
| StaticCopy | GL_STATIC_COPY | Written by GL, used as GL source many times |
| DynamicDraw | GL_DYNAMIC_DRAW | Written repeatedly, drawn many times |
| DynamicRead | GL_DYNAMIC_READ | Written by GL, read by app repeatedly |
| DynamicCopy | GL_DYNAMIC_COPY | Written by GL, used as GL source repeatedly |
MapBufferAccessMask : GLbitfield
Flags for glMapBufferRange(). Supports operator|.
| Enumerator | GL constant | Meaning |
| Read | GL_MAP_READ_BIT | CPU will read mapped data |
| Write | GL_MAP_WRITE_BIT | CPU will write mapped data |
| InvalidateRange | GL_MAP_INVALIDATE_RANGE_BIT | Invalidate the mapped range |
| InvalidateBuffer | GL_MAP_INVALIDATE_BUFFER_BIT | Invalidate the whole buffer |
| FlushExplicit | GL_MAP_FLUSH_EXPLICIT_BIT | App calls glFlushMappedBufferRange |
| Unsynchronized | GL_MAP_UNSYNCHRONIZED_BIT | No GL sync on map |
TextureTarget : GLenum
| Enumerator | ES |
| Texture2D | 2.0 |
| TextureCubeMap + 6 face targets | 2.0 |
| Texture3D / Texture2DArray | 3.0 |
| Texture2DMultisample | 3.1 |
| TextureBuffer / TextureCubeMapArray / Texture2DMultisampleArray | 3.2 |
TextureMinFilter : GLenum
| Enumerator | GL constant |
| Nearest | GL_NEAREST |
| Linear | GL_LINEAR |
| NearestMipmapNearest | GL_NEAREST_MIPMAP_NEAREST |
| LinearMipmapNearest | GL_LINEAR_MIPMAP_NEAREST |
| NearestMipmapLinear | GL_NEAREST_MIPMAP_LINEAR |
| LinearMipmapLinear | GL_LINEAR_MIPMAP_LINEAR |
TextureMagFilter : GLenum
| Enumerator | GL constant |
| Nearest | GL_NEAREST |
| Linear | GL_LINEAR |
TextureWrapMode : GLenum
| Enumerator | GL constant | ES |
| Repeat | GL_REPEAT | 2.0 |
| ClampToEdge | GL_CLAMP_TO_EDGE | 2.0 |
| MirroredRepeat | GL_MIRRORED_REPEAT | 2.0 |
| ClampToBorder | GL_CLAMP_TO_BORDER | 3.2 |
Sized and unsized internal formats for glTexImage*() and glRenderbufferStorage().
Includes base unsized (ES 2.0), sized colour (ES 3.0), and depth/stencil variants.
| Category | Examples | ES |
| Base unsized | Rgba, Rgb, Alpha, Luminance | 2.0 |
| Sized 8-bit | Rgba8, Rgb8, R8, Rg8 | 3.0 |
| Sized float | Rgba16F, Rgba32F, R16F, R32F | 3.0 |
| Sized integer | Rgba8UI, Rgba8I, Rgb32I | 3.0 |
| sRGB | Srgb8, Srgb8Alpha8 | 3.0 |
| Packed | R11FG11FB10F, Rgb9E5, Rgb10A2 | 3.0 |
| Depth/stencil | DepthComponent24/32F, Depth24Stencil8 | 3.0 |
ETC2/EAC (required ES 3.0) and ASTC LDR (ES 3.2) compressed texture formats.
| Category | Examples | ES |
| EAC single channel | R11Eac, SignedR11Eac, Rg11Eac | 3.0 |
| ETC2 RGB/RGBA | Rgb8Etc2, Rgba8Etc2Eac, Srgb8Etc2 | 3.0 |
| ASTC LDR (4×4 … 12×12) | RgbaAstc4x4 … RgbaAstc12x12 | 3.2 |
| ASTC sRGB | Srgb8Alpha8Astc4x4 … Srgb8Alpha8Astc12x12 | 3.2 |
ShaderType : GLenum
| Enumerator | GL constant | ES |
| Vertex | GL_VERTEX_SHADER | 2.0 |
| Fragment | GL_FRAGMENT_SHADER | 2.0 |
| Compute | GL_COMPUTE_SHADER | 3.1 |
| Geometry | GL_GEOMETRY_SHADER | 3.2 |
| TessControl | GL_TESS_CONTROL_SHADER | 3.2 |
| TessEvaluation | GL_TESS_EVALUATION_SHADER | 3.2 |
ShaderStageMask : GLbitfield
Bitfield for glUseProgramStages() (separable programs). Supports operator|.
| Enumerator | ES |
| Vertex / Fragment | 2.0 |
| Compute | 3.1 |
| Geometry / TessControl / TessEvaluation | 3.2 |
| AllShaderBits | all stages |
Returned by glGetActiveUniform(). Covers scalars, vectors, matrices, samplers, images, and atomics.
| Category | Examples | ES |
| Scalars | Float, Int, UnsignedInt, Bool | 2.0 |
| Vectors | FloatVec2/3/4, IntVec2/3/4, BoolVec2/3/4 | 2.0 |
| Matrices | FloatMat2/3/4, FloatMat2x3, FloatMat3x4, … | 2.0 |
| Samplers | Sampler2D, Sampler3D, SamplerCube, Sampler2DArray, … | 2.0 |
| Shadow samplers | Sampler2DShadow, SamplerCubeShadow, … | 2.0 |
| Multisample | Sampler2DMultisample, IntSampler2DMultisample | 3.1 |
| Image types | Image2D, Image3D, ImageCube, IntImage2D, … | 3.1 |
| Atomic counter | UnsignedIntAtomicCounter | 3.1 |
| Buffer/CubeArray/MS Array | SamplerBuffer, SamplerCubeMapArray, … | 3.2 |
FramebufferTarget : GLenum
| Enumerator | GL constant | ES |
| Framebuffer | GL_FRAMEBUFFER | 2.0 |
| DrawFramebuffer | GL_DRAW_FRAMEBUFFER | 3.0 |
| ReadFramebuffer | GL_READ_FRAMEBUFFER | 3.0 |
FramebufferAttachment : GLenum
Color0–Color31, Depth, Stencil, DepthStencil attachment points.
FramebufferStatus : GLenum
Return value of glCheckFramebufferStatus().
| Enumerator | Meaning | ES |
| Complete | Framebuffer is complete and renderable | 2.0 |
| Undefined | Default framebuffer, no surface | 3.0 |
| IncompleteAttachment | At least one attachment is incomplete | 2.0 |
| IncompleteMissingAttachment | No attachments at all | 2.0 |
| IncompleteDimensions | Attachments differ in size | 2.0 |
| Unsupported | Format combination not supported | 2.0 |
| IncompleteMultisample | Inconsistent sample counts | 3.0 |
| IncompleteLayerTargets | Layered/non-layered mismatch | 3.2 |
DebugSource / DebugType / DebugSeverity : GLenum
Used with glDebugMessageControl() and the debug callback. All are ES 3.2+.
| DebugSource | DebugType | DebugSeverity |
| Api, WindowSystem, ShaderCompiler, ThirdParty, Application, Other, DontCare |
Error, DeprecatedBehavior, UndefinedBehavior, Portability, Performance, Marker, PushGroup, PopGroup, Other |
High, Medium, Low, Notification, DontCare |