Magnum::GL namespace

OpenGL wrapping layer.

C++11 wrappers around OpenGL objects with state tracking and transparent extension support.

All of this library except GL::OpenGLTester is built if WITH_GL is enabled when building Magnum. To use this library with CMake, you need to request the GL component of the Magnum package and link to the Magnum::GL target:

find_package(Magnum REQUIRED GL)

# ...
target_link_libraries(your-app Magnum::GL)

See Downloading and building, Usage with CMake and OpenGL for more information.

Namespaces

namespace Extensions
Compile-time information about OpenGL extensions.

Classes

class AbstractFramebuffer
Base for default and named framebuffers.
class AbstractObject
Base for all OpenGL objects.
class AbstractQuery
Base class for queries.
class AbstractShaderProgram
Base for shader program implementations.
class AbstractTexture
Base for textures.
template<UnsignedInt location, class T>
class Attribute
Base class for attribute location and type.
class Buffer
Buffer.
template<UnsignedInt dimensions>
class BufferImage
Buffer image.
class BufferTexture
Buffer texture.
template<UnsignedInt dimensions>
class CompressedBufferImage
Compressed buffer image.
class Context
Magnum context.
class CubeMapTexture
Cube map texture.
class CubeMapTextureArray
Cube map texture array.
class DebugGroup
Debug group.
class DebugMessage
Debug message.
class DebugOutput
Debug output.
class DefaultFramebuffer
Default framebuffer.
class DynamicAttribute
Base class for dynamic attribute location and type.
class Extension
Run-time information about OpenGL extension.
class Framebuffer
Framebuffer.
class Mesh
Mesh.
class MeshView
Mesh view.
template<UnsignedInt dimensions>
class MultisampleTexture
Mulitsample texture.
class OpenGLTester
Base class for OpenGL tests and benchmarks.
class PrimitiveQuery
Query for primitives.
class RectangleTexture
Rectangle texture.
class Renderbuffer
Renderbuffer.
class Renderer
Global renderer configuration.
class SampleQuery
Query for samples.
class Sampler
Texture sampler.
class Shader
Shader.
template<UnsignedInt dimensions>
class Texture
Texture.
template<UnsignedInt dimensions>
class TextureArray
Texture array.
class TimeQuery
Query for elapsed time.
class TransformFeedback
Transform feedback.

Enums

enum class FramebufferClear: GLbitfield { Color = GL_COLOR_BUFFER_BIT, Depth = GL_DEPTH_BUFFER_BIT, Stencil = GL_STENCIL_BUFFER_BIT }
Mask for framebuffer clearing.
enum class FramebufferBlit: GLbitfield { Color = GL_COLOR_BUFFER_BIT, Depth = GL_DEPTH_BUFFER_BIT, Stencil = GL_STENCIL_BUFFER_BIT }
Mask for framebuffer blitting.
enum class FramebufferBlitFilter: GLenum { Nearest = GL_NEAREST, Linear = GL_LINEAR }
Framebuffer blit filtering.
enum class FramebufferTarget: GLenum { Read = GL_READ_FRAMEBUFFER, Draw = GL_DRAW_FRAMEBUFFER }
Framebuffer target.
enum class ObjectFlag: UnsignedByte { Created = 1 << 0, DeleteOnDestruction = 1 << 1 }
Object wrapping flag.
enum class BufferUsage: GLenum { StreamDraw = GL_STREAM_DRAW, StreamRead = GL_STREAM_READ, StreamCopy = GL_STREAM_COPY, StaticDraw = GL_STATIC_DRAW, StaticRead = GL_STATIC_READ, StaticCopy = GL_STATIC_COPY, DynamicDraw = GL_DYNAMIC_DRAW, DynamicRead = GL_DYNAMIC_READ, DynamicCopy = GL_DYNAMIC_COPY }
Buffer usage.
enum class BufferTextureFormat: GLenum { R8 = GL_R8, RG8 = GL_RG8, RGBA8 = GL_RGBA8, R16 = GL_R16, RG16 = GL_RG16, RGBA16 = GL_RGBA16, R8UI = GL_R8UI, RG8UI = GL_RG8UI, RGBA8UI = GL_RGBA8UI, R8I = GL_R8I, RG8I = GL_RG8I, RGBA8I = GL_RGBA8I, R16UI = GL_R16UI, RG16UI = GL_RG16UI, RGBA16UI = GL_RGBA16UI, R16I = GL_R16I, RG16I = GL_RG16I, RGBA16I = GL_RGBA16I, R32UI = GL_R32UI, RG32UI = GL_RG32UI, RGB32UI = GL_RGB32UI, RGBA32UI = GL_RGBA32UI, R32I = GL_R32I, RG32I = GL_RG32I, RGB32I = GL_RGB32I, RGBA32I = GL_RGBA32I, R16F = GL_R16F, RG16F = GL_RG16F, RGBA16F = GL_RGBA16F, R32F = GL_R32F, RG32F = GL_RG32F, RGB32F = GL_RGB32F, RGBA32F = GL_RGBA32F }
Internal buffer texture format.
enum class CubeMapCoordinate: GLenum { PositiveX = GL_TEXTURE_CUBE_MAP_POSITIVE_X, NegativeX = GL_TEXTURE_CUBE_MAP_NEGATIVE_X, PositiveY = GL_TEXTURE_CUBE_MAP_POSITIVE_Y, NegativeY = GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, PositiveZ = GL_TEXTURE_CUBE_MAP_POSITIVE_Z, NegativeZ = GL_TEXTURE_CUBE_MAP_NEGATIVE_Z }
Cube map coordinate.
enum class ImageAccess: GLenum { ReadOnly = GL_READ_ONLY, WriteOnly = GL_WRITE_ONLY, ReadWrite = GL_READ_WRITE }
Image access.
enum class ImageFormat: GLenum { R8 = GL_R8, RG8 = GL_RG8, RGBA8 = GL_RGBA8, R8Snorm = GL_R8_SNORM, RG8Snorm = GL_RG8_SNORM, RGBA8Snorm = GL_RGBA8_SNORM, R16 = GL_R16, RG16 = GL_RG16, RGBA16 = GL_RGBA16, R16Snorm = GL_R16_SNORM, RG16Snorm = GL_RG16_SNORM, RGBA16Snorm = GL_RGBA16_SNORM, R8UI = GL_R8UI, RG8UI = GL_RG8UI, RGBA8UI = GL_RGBA8UI, R8I = GL_R8I, RG8I = GL_RG8I, RGBA8I = GL_RGBA8I, R16UI = GL_R16UI, RG16UI = GL_RG16UI, RGBA16UI = GL_RGBA16UI, R16I = GL_R16I, RG16I = GL_RG16I, RGBA16I = GL_RGBA16I, R32UI = GL_R32UI, RG32UI = GL_RG32UI, RGBA32UI = GL_RGBA32UI, R32I = GL_R32I, RG32I = GL_RG32I, RGBA32I = GL_RGBA32I, R16F = GL_R16F, RG16F = GL_RG16F, RGBA16F = GL_RGBA16F, R32F = GL_R32F, RG32F = GL_RG32F, RGBA32F = GL_RGBA32F, R11FG11FB10F = GL_R11F_G11F_B10F, RGB10A2 = GL_RGB10_A2, RGB10A2UI = GL_RGB10_A2UI }
Image format.
enum class MeshPrimitive: GLenum { Points = GL_POINTS, Lines = GL_LINES, LineLoop = GL_LINE_LOOP, LineStrip = GL_LINE_STRIP, LinesAdjacency = GL_LINES_ADJACENCY, LineStripAdjacency = GL_LINE_STRIP_ADJACENCY, Triangles = GL_TRIANGLES, TriangleStrip = GL_TRIANGLE_STRIP, TriangleFan = GL_TRIANGLE_FAN, TrianglesAdjacency = GL_TRIANGLES_ADJACENCY, TriangleStripAdjacency = GL_TRIANGLE_STRIP_ADJACENCY, Patches = GL_PATCHES }
Mesh primitive type.
enum class MeshIndexType: GLenum { UnsignedByte = GL_UNSIGNED_BYTE, UnsignedShort = GL_UNSIGNED_SHORT, UnsignedInt = GL_UNSIGNED_INT }
Index type.
enum class MultisampleTextureSampleLocations: GLboolean { NotFixed = GL_FALSE, Fixed = GL_TRUE }
Multisample texture sample locations.
enum class PixelFormat: GLenum { Red = GL_RED, Green = GL_GREEN, Blue = GL_BLUE, Luminance = GL_LUMINANCE, RG = GL_RG, LuminanceAlpha = GL_LUMINANCE_ALPHA, RGB = GL_RGB, RGBA = GL_RGBA, BGR = GL_BGR, BGRA = GL_BGRA, SRGB = GL_SRGB_EXT, SRGBAlpha = GL_SRGB_ALPHA_EXT, RedInteger = GL_RED_INTEGER, GreenInteger = GL_GREEN_INTEGER, BlueInteger = GL_BLUE_INTEGER, RGInteger = GL_RG_INTEGER, RGBInteger = GL_RGB_INTEGER, RGBAInteger = GL_RGBA_INTEGER, BGRInteger = GL_BGR_INTEGER, BGRAInteger = GL_BGRA_INTEGER, DepthComponent = GL_DEPTH_COMPONENT, StencilIndex = GL_STENCIL_INDEX, DepthStencil = GL_DEPTH_STENCIL }
Format of pixel data.
enum class PixelType: GLenum { UnsignedByte = GL_UNSIGNED_BYTE, Byte = GL_BYTE, UnsignedShort = GL_UNSIGNED_SHORT, Short = GL_SHORT, UnsignedInt = GL_UNSIGNED_INT, Int = GL_INT, HalfFloat = GL_HALF_FLOAT, Float = GL_FLOAT, UnsignedByte332 = GL_UNSIGNED_BYTE_3_3_2, UnsignedByte233Rev = GL_UNSIGNED_BYTE_2_3_3_REV, UnsignedShort565 = GL_UNSIGNED_SHORT_5_6_5, UnsignedShort565Rev = GL_UNSIGNED_SHORT_5_6_5_REV, UnsignedShort4444 = GL_UNSIGNED_SHORT_4_4_4_4, UnsignedShort4444Rev = GL_UNSIGNED_SHORT_4_4_4_4_REV, UnsignedShort5551 = GL_UNSIGNED_SHORT_5_5_5_1, UnsignedShort1555Rev = GL_UNSIGNED_SHORT_1_5_5_5_REV, UnsignedInt8888 = GL_UNSIGNED_INT_8_8_8_8, UnsignedInt8888Rev = GL_UNSIGNED_INT_8_8_8_8_REV, UnsignedInt1010102 = GL_UNSIGNED_INT_10_10_10_2, UnsignedInt2101010Rev = GL_UNSIGNED_INT_2_10_10_10_REV, UnsignedInt10F11F11FRev = GL_UNSIGNED_INT_10F_11F_11F_REV, UnsignedInt5999Rev = GL_UNSIGNED_INT_5_9_9_9_REV, UnsignedInt248 = GL_UNSIGNED_INT_24_8, Float32UnsignedInt248Rev = GL_FLOAT_32_UNSIGNED_INT_24_8_REV }
Type of pixel data.
enum class CompressedPixelFormat: GLenum { Red = GL_COMPRESSED_RED, RG = GL_COMPRESSED_RG, RGB = GL_COMPRESSED_RGB, RGBA = GL_COMPRESSED_RGBA, RedRgtc1 = GL_COMPRESSED_RED_RGTC1, RGRgtc2 = GL_COMPRESSED_RG_RGTC2, SignedRedRgtc1 = GL_COMPRESSED_SIGNED_RED_RGTC1, SignedRGRgtc2 = GL_COMPRESSED_SIGNED_RG_RGTC2, RGBBptcUnsignedFloat = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, RGBBptcSignedFloat = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, RGBABptcUnorm = GL_COMPRESSED_RGBA_BPTC_UNORM, SRGBAlphaBptcUnorm = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, RGB8Etc2 = GL_COMPRESSED_RGB8_ETC2, SRGB8Etc2 = GL_COMPRESSED_SRGB8_ETC2, RGB8PunchthroughAlpha1Etc2 = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, SRGB8PunchthroughAlpha1Etc2 = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, RGBA8Etc2Eac = GL_COMPRESSED_RGBA8_ETC2_EAC, SRGB8Alpha8Etc2Eac = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, R11Eac = GL_COMPRESSED_R11_EAC, SignedR11Eac = GL_COMPRESSED_SIGNED_R11_EAC, RG11Eac = GL_COMPRESSED_RG11_EAC, SignedRG11Eac = GL_COMPRESSED_SIGNED_RG11_EAC, RGBS3tcDxt1 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT, RGBAS3tcDxt1 = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, RGBAS3tcDxt3 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, RGBAS3tcDxt5 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, RGBAAstc4x4 = GL_COMPRESSED_RGBA_ASTC_4x4_KHR, SRGB8Alpha8Astc4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, RGBAAstc5x4 = GL_COMPRESSED_RGBA_ASTC_5x4_KHR, SRGB8Alpha8Astc5x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, RGBAAstc5x5 = GL_COMPRESSED_RGBA_ASTC_5x5_KHR, SRGB8Alpha8Astc5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, RGBAAstc6x5 = GL_COMPRESSED_RGBA_ASTC_6x5_KHR, SRGB8Alpha8Astc6x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, RGBAAstc6x6 = GL_COMPRESSED_RGBA_ASTC_6x6_KHR, SRGB8Alpha8Astc6x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, RGBAAstc8x5 = GL_COMPRESSED_RGBA_ASTC_8x5_KHR, SRGB8Alpha8Astc8x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, RGBAAstc8x6 = GL_COMPRESSED_RGBA_ASTC_8x6_KHR, SRGB8Alpha8Astc8x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, RGBAAstc8x8 = GL_COMPRESSED_RGBA_ASTC_8x8_KHR, SRGB8Alpha8Astc8x8 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, RGBAAstc10x5 = GL_COMPRESSED_RGBA_ASTC_10x5_KHR, SRGB8Alpha8Astc10x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, RGBAAstc10x6 = GL_COMPRESSED_RGBA_ASTC_10x6_KHR, SRGB8Alpha8Astc10x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, RGBAAstc10x8 = GL_COMPRESSED_RGBA_ASTC_10x8_KHR, SRGB8Alpha8Astc10x8 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, RGBAAstc10x10 = GL_COMPRESSED_RGBA_ASTC_10x10_KHR, SRGB8Alpha8Astc10x10 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, RGBAAstc12x10 = GL_COMPRESSED_RGBA_ASTC_12x10_KHR, SRGB8Alpha8Astc12x10 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, RGBAAstc12x12 = GL_COMPRESSED_RGBA_ASTC_12x12_KHR, SRGB8Alpha8Astc12x12 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR }
Format of compressed pixel data.
enum class RenderbufferFormat: GLenum { Red = GL_RED, R8 = GL_R8, RG = GL_RG, RG8 = GL_RG8, RGBA = GL_RGBA, RGBA8 = GL_RGBA8, R16 = GL_R16, RG16 = GL_RG16, RGB16 = GL_RGB16, RGBA16 = GL_RGBA16, R8UI = GL_R8UI, RG8UI = GL_RG8UI, RGBA8UI = GL_RGBA8UI, R8I = GL_R8I, RG8I = GL_RG8I, RGBA8I = GL_RGBA8I, R16UI = GL_R16UI, RG16UI = GL_RG16UI, RGBA16UI = GL_RGBA16UI, R16I = GL_R16I, RG16I = GL_RG16I, RGBA16I = GL_RGBA16I, R32UI = GL_R32UI, RG32UI = GL_RG32UI, RGBA32UI = GL_RGBA32UI, R32I = GL_R32I, RG32I = GL_RG32I, RGBA32I = GL_RGBA32I, R16F = GL_R16F, RG16F = GL_RG16F, RGBA16F = GL_RGBA16F, R32F = GL_R32F, RG32F = GL_RG32F, RGBA32F = GL_RGBA32F, RGB10A2 = GL_RGB10_A2, RGB10A2UI = GL_RGB10_A2UI, RGB5A1 = GL_RGB5_A1, RGBA4 = GL_RGBA4, R11FG11FB10F = GL_R11F_G11F_B10F, RGB565 = GL_RGB565, SRGB8Alpha8 = GL_SRGB8_ALPHA8, DepthComponent = GL_DEPTH_COMPONENT, DepthComponent16 = GL_DEPTH_COMPONENT16, DepthComponent24 = GL_DEPTH_COMPONENT24, DepthComponent32 = GL_DEPTH_COMPONENT32, DepthComponent32F = GL_DEPTH_COMPONENT32F, StencilIndex = GL_STENCIL_INDEX, StencilIndex1 = GL_STENCIL_INDEX1, StencilIndex4 = GL_STENCIL_INDEX4, StencilIndex8 = GL_STENCIL_INDEX8, StencilIndex16 = GL_STENCIL_INDEX16, DepthStencil = GL_DEPTH_STENCIL, Depth24Stencil8 = GL_DEPTH24_STENCIL8, Depth32FStencil8 = GL_DEPTH32F_STENCIL8 }
Internal renderbuffer format.
enum class SamplerFilter: GLint { Nearest = GL_NEAREST, Linear = GL_LINEAR }
Texture sampler filtering.
enum class SamplerMipmap: GLint { Base = GL_NEAREST & ~GL_NEAREST, Nearest = GL_NEAREST_MIPMAP_NEAREST & ~GL_NEAREST, Linear = GL_NEAREST_MIPMAP_LINEAR & ~GL_NEAREST }
Texture sampler mip level selection.
enum class SamplerWrapping: GLint { Repeat = GL_REPEAT, MirroredRepeat = GL_MIRRORED_REPEAT, ClampToEdge = GL_CLAMP_TO_EDGE, ClampToBorder = GL_CLAMP_TO_BORDER, MirrorClampToEdge = GL_MIRROR_CLAMP_TO_EDGE }
Texture sampler wrapping.
enum class SamplerCompareMode: GLenum { None = GL_NONE, CompareRefToTexture = GL_COMPARE_REF_TO_TEXTURE }
Depth texture comparison mode.
enum class SamplerCompareFunction: GLenum { Never = GL_NEVER, Always = GL_ALWAYS, Less = GL_LESS, LessOrEqual = GL_LEQUAL, Equal = GL_EQUAL, NotEqual = GL_NOTEQUAL, GreaterOrEqual = GL_GEQUAL, Greater = GL_GREATER }
Texture sampler depth comparison function.
enum class SamplerDepthStencilMode: GLenum { DepthComponent = GL_DEPTH_COMPONENT, StencilIndex = GL_STENCIL_INDEX }
Texture sampler depth/stencil mode.
enum class TextureFormat: GLenum { Red = GL_RED, R8 = GL_R8, RG = GL_RG, RG8 = GL_RG8, RGB = GL_RGB, RGB8 = GL_RGB8, RGBA = GL_RGBA, RGBA8 = GL_RGBA8, R8Snorm = GL_R8_SNORM, RG8Snorm = GL_RG8_SNORM, RGB8Snorm = GL_RGB8_SNORM, RGBA8Snorm = GL_RGBA8_SNORM, R16 = GL_R16, RG16 = GL_RG16, RGB16 = GL_RGB16, RGBA16 = GL_RGBA16, R16Snorm = GL_R16_SNORM, RG16Snorm = GL_RG16_SNORM, RGB16Snorm = GL_RGB16_SNORM, RGBA16Snorm = GL_RGBA16_SNORM, R8UI = GL_R8UI, RG8UI = GL_RG8UI, RGB8UI = GL_RGB8UI, RGBA8UI = GL_RGBA8UI, R8I = GL_R8I, RG8I = GL_RG8I, RGB8I = GL_RGB8I, RGBA8I = GL_RGBA8I, R16UI = GL_R16UI, RG16UI = GL_RG16UI, RGB16UI = GL_RGB16UI, RGBA16UI = GL_RGBA16UI, R16I = GL_R16I, RG16I = GL_RG16I, RGB16I = GL_RGB16I, RGBA16I = GL_RGBA16I, R32UI = GL_R32UI, RG32UI = GL_RG32UI, RGB32UI = GL_RGB32UI, RGBA32UI = GL_RGBA32UI, R32I = GL_R32I, RG32I = GL_RG32I, RGB32I = GL_RGB32I, RGBA32I = GL_RGBA32I, R16F = GL_R16F, RG16F = GL_RG16F, RGB16F = GL_RGB16F, RGBA16F = GL_RGBA16F, R32F = GL_R32F, RG32F = GL_RG32F, RGB32F = GL_RGB32F, RGBA32F = GL_RGBA32F, Luminance = GL_LUMINANCE, LuminanceAlpha = GL_LUMINANCE_ALPHA, R3B3G2 = GL_R3_G3_B2, RGB4 = GL_RGB4, RGB5 = GL_RGB5, RGB565 = GL_RGB565, RGB10 = GL_RGB10, RGB12 = GL_RGB12, R11FG11FB10F = GL_R11F_G11F_B10F, RGB9E5 = GL_RGB9_E5, SRGB = GL_SRGB, SRGB8 = GL_SRGB8, RGBA2 = GL_RGBA2, RGBA4 = GL_RGBA4, RGB5A1 = GL_RGB5_A1, RGB10A2 = GL_RGB10_A2, RGB10A2UI = GL_RGB10_A2UI, RGBA12 = GL_RGBA12, SRGBAlpha = GL_SRGB_ALPHA, SRGB8Alpha8 = GL_SRGB8_ALPHA8, CompressedRed = GL_COMPRESSED_RED, CompressedRG = GL_COMPRESSED_RG, CompressedRGB = GL_COMPRESSED_RGB, CompressedRGBA = GL_COMPRESSED_RGBA, CompressedRedRgtc1 = GL_COMPRESSED_RED_RGTC1, CompressedRGRgtc2 = GL_COMPRESSED_RG_RGTC2, CompressedSignedRedRgtc1 = GL_COMPRESSED_SIGNED_RED_RGTC1, CompressedSignedRGRgtc2 = GL_COMPRESSED_SIGNED_RG_RGTC2, CompressedRGBBptcUnsignedFloat = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, CompressedRGBBptcSignedFloat = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, CompressedRGBABptcUnorm = GL_COMPRESSED_RGBA_BPTC_UNORM, CompressedSRGBAlphaBptcUnorm = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, CompressedRGB8Etc2 = GL_COMPRESSED_RGB8_ETC2, CompressedSRGB8Etc2 = GL_COMPRESSED_SRGB8_ETC2, CompressedRGB8PunchthroughAlpha1Etc2 = GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, CompressedSRGB8PunchthroughAlpha1Etc2 = GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, CompressedRGBA8Etc2Eac = GL_COMPRESSED_RGBA8_ETC2_EAC, CompressedSRGB8Alpha8Etc2Eac = GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, CompressedR11Eac = GL_COMPRESSED_R11_EAC, CompressedSignedR11Eac = GL_COMPRESSED_SIGNED_R11_EAC, CompressedRG11Eac = GL_COMPRESSED_RG11_EAC, CompressedSignedRG11Eac = GL_COMPRESSED_SIGNED_RG11_EAC, CompressedRGBS3tcDxt1 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT, CompressedRGBAS3tcDxt1 = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, CompressedRGBAS3tcDxt3 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, CompressedRGBAS3tcDxt5 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, CompressedRGBAAstc4x4 = GL_COMPRESSED_RGBA_ASTC_4x4_KHR, CompressedSRGB8Alpha8Astc4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, CompressedRGBAAstc5x4 = GL_COMPRESSED_RGBA_ASTC_5x4_KHR, CompressedSRGB8Alpha8Astc5x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, CompressedRGBAAstc5x5 = GL_COMPRESSED_RGBA_ASTC_5x5_KHR, CompressedSRGB8Alpha8Astc5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, CompressedRGBAAstc6x5 = GL_COMPRESSED_RGBA_ASTC_6x5_KHR, CompressedSRGB8Alpha8Astc6x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, CompressedRGBAAstc6x6 = GL_COMPRESSED_RGBA_ASTC_6x6_KHR, CompressedSRGB8Alpha8Astc6x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, CompressedRGBAAstc8x5 = GL_COMPRESSED_RGBA_ASTC_8x5_KHR, CompressedSRGB8Alpha8Astc8x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, CompressedRGBAAstc8x6 = GL_COMPRESSED_RGBA_ASTC_8x6_KHR, CompressedSRGB8Alpha8Astc8x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, CompressedRGBAAstc8x8 = GL_COMPRESSED_RGBA_ASTC_8x8_KHR, CompressedSRGB8Alpha8Astc8x8 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, CompressedRGBAAstc10x5 = GL_COMPRESSED_RGBA_ASTC_10x5_KHR, CompressedSRGB8Alpha8Astc10x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, CompressedRGBAAstc10x6 = GL_COMPRESSED_RGBA_ASTC_10x6_KHR, CompressedSRGB8Alpha8Astc10x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, CompressedRGBAAstc10x8 = GL_COMPRESSED_RGBA_ASTC_10x8_KHR, CompressedSRGB8Alpha8Astc10x8 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, CompressedRGBAAstc10x10 = GL_COMPRESSED_RGBA_ASTC_10x10_KHR, CompressedSRGB8Alpha8Astc10x10 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, CompressedRGBAAstc12x10 = GL_COMPRESSED_RGBA_ASTC_12x10_KHR, CompressedSRGB8Alpha8Astc12x10 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, CompressedRGBAAstc12x12 = GL_COMPRESSED_RGBA_ASTC_12x12_KHR, CompressedSRGB8Alpha8Astc12x12 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, DepthComponent = GL_DEPTH_COMPONENT, DepthComponent16 = GL_DEPTH_COMPONENT16, DepthComponent24 = GL_DEPTH_COMPONENT24, DepthComponent32 = GL_DEPTH_COMPONENT32, DepthComponent32F = GL_DEPTH_COMPONENT32F, StencilIndex8 = GL_STENCIL_INDEX8, DepthStencil = GL_DEPTH_STENCIL, Depth24Stencil8 = GL_DEPTH24_STENCIL8, Depth32FStencil8 = GL_DEPTH32F_STENCIL8 }
Internal texture format.
enum class Version: Int { None = 0xFFFF, GL210 = 210, GL300 = 300, GL310 = 310, GL320 = 320, GL330 = 330, GL400 = 400, GL410 = 410, GL420 = 420, GL430 = 430, GL440 = 440, GL450 = 450, GL460 = 460, GLES200 = Implementation::VersionESMask|200, GLES300 = Implementation::VersionESMask|300, GLES310 = Implementation::VersionESMask|310, GLES320 = Implementation::VersionESMask|320 }
OpenGL version.

Typedefs

using FramebufferClearMask = Containers::EnumSet<FramebufferClear>
Mask for clearing.
using FramebufferBlitMask = Containers::EnumSet<FramebufferBlit>
Mask for framebuffer blitting.
using ObjectFlags = Containers::EnumSet<ObjectFlag>
Object wrapping flags.
using BufferImage1D = BufferImage<1>
One-dimensional buffer image.
using BufferImage2D = BufferImage<2>
Two-dimensional buffer image.
using BufferImage3D = BufferImage<3>
Three-dimensional buffer image.
using CompressedBufferImage1D = CompressedBufferImage<1>
One-dimensional compressed buffer image.
using CompressedBufferImage2D = CompressedBufferImage<2>
Two-dimensional compressed buffer image.
using CompressedBufferImage3D = CompressedBufferImage<3>
Three-dimensional compressed buffer image.
using MultisampleTexture2D = MultisampleTexture<2>
Two-dimensional multisample texture.
using MultisampleTexture2DArray = MultisampleTexture<3>
Two-dimensional multisample texture array.
using Texture1D = Texture<1>
One-dimensional texture.
using Texture2D = Texture<2>
Two-dimensional texture.
using Texture3D = Texture<3>
Three-dimensional texture.
using Texture1DArray = TextureArray<1>
One-dimensional texture array.
using Texture2DArray = TextureArray<2>
Two-dimensional texture array.

Functions

template<class T>
auto operator<<(Debug& debug, Attribute<T>::Components) -> Debug&
Debug output operator.
template<class T>
auto operator<<(Debug& debug, Attribute<T>::DataType) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Buffer::TargetHint value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Buffer::Target value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Context::Flag value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Context::Flags value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Context::DetectedDriver value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Context::DetectedDrivers value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DebugOutput::Source value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DebugOutput::Type value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DebugOutput::Severity value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DebugMessage::Source value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DebugMessage::Type value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DebugGroup::Source value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, DefaultFramebuffer::Status value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Framebuffer::Status value) -> Debug&
Debug output operator.
auto meshPrimitive(Magnum::MeshPrimitive primitive) -> MeshPrimitive
Convert generic mesh primitive to OpenGL mesh primitive.
auto meshIndexType(Magnum::MeshIndexType type) -> MeshIndexType
Convert generic mesh index type to OpenGL mesh index type.
auto operator<<(Debug& debug, MeshPrimitive value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, MeshIndexType value) -> Debug&
Debug output operator.
auto hasPixelFormat(Magnum::PixelFormat format) -> bool
Check availability of a generic pixel format.
auto pixelFormat(Magnum::PixelFormat format) -> PixelFormat
Convert a generic pixel format to OpenGL pixel format.
auto pixelType(Magnum::PixelFormat format, UnsignedInt extra = 0) -> PixelType
Convert a generic pixel type to OpenGL pixel type.
auto pixelSize(PixelFormat format, PixelType type) -> UnsignedInt
Pixel size for given format/type combination (in bytes)
auto pixelSize(Magnum::PixelFormat format, PixelType type) -> UnsignedInt deprecated
Pixel size for given format/type combination (in bytes)
auto operator<<(Debug& debug, PixelFormat value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, PixelType value) -> Debug&
Debug output operator.
auto hasCompressedPixelFormat(Magnum::CompressedPixelFormat format) -> bool
Check availability of generic compressed pixel format.
auto compressedPixelFormat(Magnum::CompressedPixelFormat format) -> CompressedPixelFormat
Convert generic compressed pixel format to OpenGL compressed pixel format.
auto operator<<(Debug& debug, CompressedPixelFormat value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Renderer::Error value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Renderer::ResetNotificationStrategy value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Renderer::GraphicsResetStatus value) -> Debug&
Debug output operator.
auto samplerFilter(Magnum::SamplerFilter filter) -> SamplerFilter
Convert generic texture sampler filter mode to OpenGL filter mode.
auto samplerMipmap(Magnum::SamplerMipmap mipmap) -> SamplerMipmap
Convert generic sampler filter mode to OpenGL filter mode.
auto hasSamplerWrapping(Magnum::SamplerWrapping wrapping) -> bool
Check availability of a generic sampler wrapping mode.
auto samplerWrapping(Magnum::SamplerWrapping wrapping) -> SamplerWrapping
Convert generic sampler filter mode to OpenGL filter mode.
auto operator<<(Debug& debug, SamplerFilter value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerMipmap value) -> Debug&
Debug output operator.
template<UnsignedInt dimensions>
auto samplerWrapping(const Array<dimensions, Magnum::SamplerWrapping>& wrapping) -> Array<dimensions, SamplerWrapping>
auto operator<<(Debug& debug, SamplerWrapping value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerCompareMode value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerCompareFunction value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerDepthStencilMode value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, Shader::Type value) -> Debug&
Debug output operator.
auto version(Int major, Int minor) -> Version constexpr
Enum value from major and minor version number.
auto version(Version version) -> std::pair<Int, Int>
Major and minor version number from enum value.
auto isVersionES(Version version) -> bool constexpr
Whether given version is OpenGL ES or WebGL.
auto operator<<(Debug& debug, Version value) -> Debug&
Debug output operator.

Variables

DefaultFramebuffer defaultFramebuffer
Default framebuffer instance.

Enum documentation

enum class Magnum::GL::FramebufferClear: GLbitfield

Mask for framebuffer clearing.

Enumerators
Color

Color buffer

Depth

Depth buffer

Stencil

Stencil buffer

enum class Magnum::GL::FramebufferBlit: GLbitfield

Mask for framebuffer blitting.

Enumerators
Color

Color buffer

Depth

Depth buffer

Stencil

Stencil buffer

enum class Magnum::GL::FramebufferBlitFilter: GLenum

Framebuffer blit filtering.

Enumerators
Nearest

Nearest neighbor filtering

Linear

Linear interpolation filtering

enum class Magnum::GL::FramebufferTarget: GLenum

Framebuffer target.

Enumerators
Read

Frambebuffer reading target

Draw

Framebuffer drawing target

enum class Magnum::GL::ObjectFlag: UnsignedByte

Object wrapping flag.

Enumerators
Created

The object is known to be already created, either by using glCreate*() function or by binding object previously generated by glGen*() function. If you are not sure, don't specify this flag.

DeleteOnDestruction

Delete the object on destruction.

enum class Magnum::GL::BufferUsage: GLenum

Buffer usage.

Enumerators
StreamDraw

Set once by the application and used infrequently for drawing.

StreamRead

Set once as output from an OpenGL command and used infequently for drawing.

StreamCopy

Set once as output from an OpenGL command and used infrequently for drawing or copying to other buffers.

StaticDraw

Set once by the application and used frequently for drawing. A good default choice if you are not sure.

StaticRead

Set once as output from an OpenGL command and queried many times by the application.

StaticCopy

Set once as output from an OpenGL command and used frequently for drawing or copying to other buffers.

DynamicDraw

Updated frequently by the application and used frequently for drawing or copying to other images.

DynamicRead

Updated frequently as output from OpenGL command and queried many times from the application.

DynamicCopy

Updated frequently as output from OpenGL command and used frequently for drawing or copying to other images.

enum class Magnum::GL::BufferTextureFormat: GLenum

Internal buffer texture format.

Enumerators
R8

Red component, normalized unsigned byte.

RG8

Red and green component, each normalized unsigned byte.

RGBA8

RGBA, each component normalized unsigned byte.

R16

Red component, normalized unsigned short.

RG16

Red and green component, each normalized unsigned short.

RGBA16

RGBA, each component normalized unsigned short.

R8UI

Red component, non-normalized unsigned byte.

RG8UI

Red and green component, each non-normalized unsigned byte.

RGBA8UI

RGBA, each component non-normalized unsigned byte.

R8I

Red component, non-normalized signed byte.

RG8I

Red and green component, each non-normalized signed byte.

RGBA8I

RGBA, each component non-normalized signed byte.

R16UI

Red component, non-normalized unsigned short.

RG16UI

Red and green component, each non-normalized unsigned short.

RGBA16UI

RGBA, each component non-normalized unsigned short.

R16I

Red component, non-normalized signed short.

RG16I

Red and green component, each non-normalized signed short.

RGBA16I

RGBA, each component non-normalized signed short.

R32UI

Red component, non-normalized unsigned int.

RG32UI

Red and green component, each non-normalized unsigned int.

RGB32UI

RGB, each component non-normalized unsigned int.

RGBA32UI

RGBA, each component non-normalized unsigned int.

R32I

Red component, non-normalized signed int.

RG32I

Red and green component, each non-normalized signed int.

RGB32I

RGB, each component non-normalized signed int.

RGBA32I

RGBA, each component non-normalized signed int.

R16F

Red component, half float.

RG16F

Red and green component, each half float.

RGBA16F

RGBA, each component half float.

R32F

Red component, float.

RG32F

Red and green component, each float.

RGB32F

RGB, each component float.

RGBA32F

RGBA, each component float.

enum class Magnum::GL::CubeMapCoordinate: GLenum

Cube map coordinate.

Enumerators
PositiveX

+X cube side

NegativeX

-X cube side

PositiveY

+Y cube side

NegativeY

-Y cube side

PositiveZ

+Z cube side

NegativeZ

-Z cube side

enum class Magnum::GL::ImageAccess: GLenum

Image access.

Enumerators
ReadOnly
WriteOnly
ReadWrite

enum class Magnum::GL::ImageFormat: GLenum

Image format.

Enumerators
R8

Red component, normalized unsigned byte.

RG8

Red and green component, each normalized unsigned byte.

RGBA8

RGBA, each component normalized unsigned byte.

R8Snorm

Red component, normalized signed byte.

RG8Snorm

Red and green component, each normalized signed byte.

RGBA8Snorm

RGBA, each component normalized unsigned byte.

R16

Red component, normalized unsigned short.

RG16

Red and green component, each normalized unsigned short.

RGBA16

RGBA, each component normalized unsigned short.

R16Snorm

Red component, normalized signed short.

RG16Snorm

Red and green component, each normalized signed short.

RGBA16Snorm

RGBA, each component normalized unsigned short.

R8UI

Red component, non-normalized unsigned byte.

RG8UI

Red and green component, each non-normalized unsigned byte.

RGBA8UI

RGBA, each component non-normalized unsigned byte.

R8I

Red component, non-normalized signed byte.

RG8I

Red and green component, each non-normalized signed byte.

RGBA8I

RGBA, each component non-normalized signed byte.

R16UI

Red component, non-normalized unsigned short.

RG16UI

Red and green component, each non-normalized unsigned short.

RGBA16UI

RGBA, each component non-normalized unsigned short.

R16I

Red component, non-normalized signed short.

RG16I

Red and green component, each non-normalized signed short.

RGBA16I

RGBA, each component non-normalized signed short.

R32UI

Red component, non-normalized unsigned int.

RG32UI

Red and green component, each non-normalized unsigned int.

RGBA32UI

RGBA, each component non-normalized unsigned int.

R32I

Red component, non-normalized signed int.

RG32I

Red and green component, each non-normalized signed int.

RGBA32I

RGBA, each component non-normalized signed int.

R16F

Red component, half float.

RG16F

Red and green component, each half float.

RGBA16F

RGBA, each component half float.

R32F

Red component, float.

RG32F

Red and green component, each float.

RGBA32F

RGBA, each component float.

R11FG11FB10F

RGB, float, red and green component 11bit, blue 10bit.

RGB10A2

RGBA, normalized unsigned, each RGB component 10bit, alpha 2bit.

RGB10A2UI

RGBA, non-normalized unsigned, each RGB component 10bit, alpha 2bit.

enum class Magnum::GL::MeshPrimitive: GLenum

Mesh primitive type.

Enumerators
Points

Single points.

Lines

Each pair of vertices defines a single line, lines aren't connected together.

LineLoop

Line strip, last and first vertex are connected together.

LineStrip

First two vertices define first line segment, each following vertex defines another segment.

LinesAdjacency

Lines with adjacency information.

LineStripAdjacency

Line strip with adjacency information.

Triangles

Each three vertices define one triangle.

TriangleStrip

First three vertices define first triangle, each following vertex defines another triangle.

TriangleFan

First vertex is center, each following vertex is connected to previous and center vertex.

TrianglesAdjacency

Triangles with adjacency information.

TriangleStripAdjacency

Triangle strip with adjacency information.

Patches

Patches.

enum class Magnum::GL::MeshIndexType: GLenum

Index type.

Enumerators
UnsignedByte

Unsigned byte

UnsignedShort

Unsigned short

UnsignedInt

Unsigned int

enum class Magnum::GL::MultisampleTextureSampleLocations: GLboolean

Multisample texture sample locations.

Enumerators
NotFixed

Not fixed

Fixed

Fixed

enum class Magnum::GL::PixelFormat: GLenum

Format of pixel data.

Note that some formats can be used only for framebuffer reading (using AbstractFramebuffer::read()) and some only for texture data (using Texture::setSubImage() and others), the limitations are mentioned in documentation of each particular value.

In most cases you may want to use PixelFormat::Red (for grayscale images), PixelFormat::RGB or PixelFormat::RGBA along with PixelType::UnsignedByte, the matching texture format is then TextureFormat::R8, TextureFormat::RGB8 or TextureFormat::RGBA8. See documentation of these values for possible limitations when using OpenGL ES 2.0 or WebGL.

Enumerators
Red

Floating-point red channel.

Green

Floating-point green channel.

Blue

Floating-point blue channel.

Luminance

Floating-point luminance channel. The value is used for all RGB channels.

RG

Floating-point red and green channel.

LuminanceAlpha

Floating-point luminance and alpha channel. First value is used for all RGB channels, second value is used for alpha channel.

RGB

Floating-point RGB.

RGBA

Floating-point RGBA.

BGR

Floating-point BGR.

BGRA

Floating-point BGRA.

SRGB

Floating-point sRGB.

SRGBAlpha

Floating-point sRGB + alpha.

RedInteger

Integer red channel.

GreenInteger

Integer green channel.

BlueInteger

Integer blue channel.

RGInteger

Integer red and green channel.

RGBInteger

Integer RGB.

RGBAInteger

Integer RGBA.

BGRInteger

Integer BGR.

BGRAInteger

Integer BGRA.

DepthComponent

Depth component.

StencilIndex

Stencil index.

DepthStencil

Depth and stencil.

enum class Magnum::GL::PixelType: GLenum

Type of pixel data.

Note that some formats can be used only for framebuffer reading (using AbstractFramebuffer::read()) and some only for texture data (using Texture::setSubImage() and others), the limitations are mentioned in documentation of each particular value.

In most cases you may want to use PixelType::UnsignedByte along with PixelFormat::Red (for grayscale images), PixelFormat::RGB or PixelFormat::RGBA, the matching texture format is then TextureFormat::R8, TextureFormat::RGB8 or TextureFormat::RGBA8. See documentation of these values for possible limitations when using OpenGL ES 2.0 or WebGL.

Enumerators
UnsignedByte

Each component unsigned byte.

Byte

Each component signed byte.

UnsignedShort

Each component unsigned short.

Short

Each component signed short.

UnsignedInt

Each component unsigned int.

Int

Each component signed int.

HalfFloat

Each component half float.

Float

Each component float.

UnsignedByte332

RGB, unsigned byte, red and green component 3bit, blue component 2bit.

UnsignedByte233Rev

BGR, unsigned byte, red and green component 3bit, blue component 2bit.

UnsignedShort565

RGB, unsigned byte, red and blue component 5bit, green 6bit.

UnsignedShort565Rev

BGR, unsigned short, red and blue 5bit, green 6bit.

UnsignedShort4444

RGBA, unsigned short, each component 4bit.

UnsignedShort4444Rev

ABGR, unsigned short, each component 4bit.

UnsignedShort5551

RGBA, unsigned short, each RGB component 5bit, alpha component 1bit.

UnsignedShort1555Rev

ABGR, unsigned short, each RGB component 5bit, alpha component 1bit.

UnsignedInt8888

RGBA, unsigned int, each component 8bit.

UnsignedInt8888Rev

ABGR, unsigned int, each component 8bit.

UnsignedInt1010102

RGBA, unsigned int, each RGB component 10bit, alpha component 2bit.

UnsignedInt2101010Rev

ABGR, unsigned int, each RGB component 10bit, alpha component 2bit.

UnsignedInt10F11F11FRev

BGR, unsigned int, red and green 11bit float, blue 10bit float.

UnsignedInt5999Rev

BGR, unsigned int, each component 9bit + 5bit exponent.

UnsignedInt248

Unsigned int, depth component 24bit, stencil index 8bit.

Float32UnsignedInt248Rev

Float + unsigned int, depth component 32bit float, 24bit gap, stencil index 8bit.

enum class Magnum::GL::CompressedPixelFormat: GLenum

Format of compressed pixel data.

Equivalent to Compressed* values of TextureFormat enum.

Enumerators
Red

Compressed red channel, normalized unsigned.

RG

Compressed red and green channel, normalized unsigned.

RGB

Compressed RGB, normalized unsigned.

RGBA

Compressed RGBA, normalized unsigned.

RedRgtc1

RGTC compressed red channel, normalized unsigned. Available only for 2D, 2D array, cube map and cube map array textures.

RGRgtc2

RGTC compressed red and green channel, normalized unsigned. Available only for 2D, 2D array, cube map and cube map array textures.

SignedRedRgtc1

RGTC compressed red channel, normalized signed. Available only for 2D, 2D array, cube map and cube map array textures.

SignedRGRgtc2

RGTC compressed red and green channel, normalized signed. Available only for 2D, 2D array, cube map and cube map array textures.

RGBBptcUnsignedFloat

BPTC compressed RGB, unsigned float. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBBptcSignedFloat

BPTC compressed RGB, signed float. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBABptcUnorm

BPTC compressed RGBA, normalized unsigned. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGBAlphaBptcUnorm

BPTC compressed sRGBA, normalized unsigned. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGB8Etc2

ETC2 compressed RGB, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

SRGB8Etc2

ETC2 compressed sRGB, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

RGB8PunchthroughAlpha1Etc2

ETC2 compressed RGB with punchthrough (single-bit) alpha, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

SRGB8PunchthroughAlpha1Etc2

ETC2 compressed sRGB with punchthrough (single-bit) alpha, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

RGBA8Etc2Eac

ETC2/EAC compressed RGBA, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Etc2Eac

ETC2/EAC compressed sRGB with alpha, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

R11Eac

EAC compressed red channel, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

SignedR11Eac

EAC compressed red channel, normalized signed. Available only on 2D, 2D array, cube map and cube map array textures.

RG11Eac

EAC compressed red and green channel, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

SignedRG11Eac

EAC compressed red and green channel, normalized signed. Available only on 2D, 2D array, cube map and cube map array textures.

RGBS3tcDxt1

S3TC DXT1 compressed RGB. Available only for 2D, 2D array, cube map and cube map array textures.

RGBAS3tcDxt1

S3TC DXT1 compressed RGBA. Available only for 2D, 2D array, cube map and cube map array textures.

RGBAS3tcDxt3

S3TC DXT3 compressed RGBA. Available only for 2D, 2D array, cube map and cube map array textures.

RGBAS3tcDxt5

S3TC DXT5 compressed RGBA. Available only for 2D, 2D array, cube map and cube map array textures.

RGBAAstc4x4

ASTC compressed RGBA with 4x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc4x4

ASTC compressed sRGB with alpha with 4x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc5x4

ASTC compressed RGBA with 5x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc5x4

ASTC compressed sRGB with alpha with 5x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc5x5

ASTC compressed RGBA with 5x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc5x5

ASTC compressed sRGB with alpha with 5x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc6x5

ASTC compressed RGBA with 6x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc6x5

ASTC compressed sRGB with alpha with 6x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc6x6

ASTC compressed RGBA with 6x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc6x6

ASTC compressed sRGB with alpha with 6x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc8x5

ASTC compressed RGBA with 8x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc8x5

ASTC compressed sRGB with alpha with 8x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc8x6

ASTC compressed RGBA with 8x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc8x6

ASTC compressed sRGB with alpha with 8x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc8x8

ASTC compressed RGBA with 8x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc8x8

ASTC compressed sRGB with alpha with 8x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc10x5

ASTC compressed RGBA with 10x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc10x5

ASTC compressed sRGB with alpha with 10x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc10x6

ASTC compressed RGBA with 10x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc10x6

ASTC compressed sRGB with alpha with 10x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc10x8

ASTC compressed RGBA with 10x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc10x8

ASTC compressed sRGB with alpha with 10x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc10x10

ASTC compressed RGBA with 10x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc10x10

ASTC compressed sRGB with alpha with 10x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc12x10

ASTC compressed RGBA with 12x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc12x10

ASTC compressed sRGB with alpha with 12x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

RGBAAstc12x12

ASTC compressed RGBA with 12x12 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

SRGB8Alpha8Astc12x12

ASTC compressed sRGB with alpha with 12x12 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

enum class Magnum::GL::RenderbufferFormat: GLenum

Internal renderbuffer format.

Enumerators
Red

Red component, normalized unsigned, size implementation-dependent.

R8

Red component, normalized unsigned byte.

RG

Red and green component, normalized unsigned, size implementation-dependent.

RG8

Red and green component, each normalized unsigned byte.

RGBA

RGBA, normalized unsigned, size implementation-dependent.

RGBA8

RGBA, each component normalized unsigned byte.

R16

Red component, normalized unsigned short.

RG16

Red and green component, each normalized unsigned short.

RGB16

RGB, each component normalized unsigned short.

RGBA16

RGBA, each component normalized unsigned short.

R8UI

Red component, non-normalized unsigned byte.

RG8UI

Red and green component, each non-normalized unsigned byte.

RGBA8UI

RGBA, each component non-normalized unsigned byte.

R8I

Red component, non-normalized signed byte.

RG8I

Red and green component, each non-normalized signed byte.

RGBA8I

RGBA, each component non-normalized signed byte.

R16UI

Red component, non-normalized unsigned short.

RG16UI

Red and green component, each non-normalized unsigned short.

RGBA16UI

RGBA, each component non-normalized unsigned short.

R16I

Red component, non-normalized signed short.

RG16I

Red and green component, each non-normalized signed short.

RGBA16I

RGBA, each component non-normalized signed short.

R32UI

Red component, non-normalized unsigned int.

RG32UI

Red and green component, each non-normalized unsigned int.

RGBA32UI

RGBA, each component non-normalized unsigned int.

R32I

Red component, non-normalized signed int.

RG32I

Red and green component, each non-normalized signed int.

RGBA32I

RGBA, each component non-normalized signed int.

R16F

Red component, half float.

RG16F

Red and green component, each half float.

RGBA16F

RGBA, each component half float.

R32F

Red component, float.

RG32F

Red and green component, each float.

RGBA32F

RGBA, each component float.

RGB10A2

RGBA, normalized unsigned, each RGB component 10bit, alpha 2bit.

RGB10A2UI

RGBA, non-normalized unsigned, each RGB component 10bit, alpha 2bit.

RGB5A1

RGBA, normalized unsigned, each RGB component 5bit, alpha 1bit.

RGBA4

RGBA, normalized unsigned, each component 4bit.

R11FG11FB10F

RGB, float, red and green 11bit, blue 10bit.

RGB565

RGB, normalized unsigned, red and blue 5bit, green 6bit.

SRGB8Alpha8

sRGBA, each component normalized unsigned byte.

DepthComponent

Depth component, size implementation-dependent.

DepthComponent16

Depth component, 16bit.

DepthComponent24

Depth component, 24bit.

DepthComponent32

Depth component, 32bit.

DepthComponent32F

Depth component, 32bit float.

StencilIndex

Stencil index, size implementation-dependent.

StencilIndex1

1-bit stencil index.

StencilIndex4

4-bit stencil index.

StencilIndex8

8-bit stencil index.

StencilIndex16

16-bit stencil index.

DepthStencil

Depth and stencil component, size implementation-dependent.

Depth24Stencil8

24bit depth and 8bit stencil component.

Depth32FStencil8

32bit float depth component and 8bit stencil component.

enum class Magnum::GL::SamplerFilter: GLint

Texture sampler filtering.

Enumerators
Nearest

Nearest neighbor filtering

Linear

Linear interpolation filtering. Can't be used with integer texture formats.

enum class Magnum::GL::SamplerMipmap: GLint

Texture sampler mip level selection.

Enumerators
Base

Select base mip level

Nearest

Select nearest mip level. Unavailable on rectangle textures.

Linear

Linear interpolation of nearest mip levels. Unavailable on rectangle textures.

enum class Magnum::GL::SamplerWrapping: GLint

Texture sampler wrapping.

Enumerators
Repeat

Repeat texture. Unavailable on rectangle textures.

MirroredRepeat

Repeat mirrored texture. Unavailable on rectangle textures.

ClampToEdge

Clamp to edge. Coordinates out of the range will be clamped to first / last column / row in given direction.

ClampToBorder

Clamp to border color. Coordinates out of range will be clamped to border color (set with *Texture::setBorderColor()).

MirrorClampToEdge

Mirror the texture once in negative coordinates and clamp to edge after that. Unavailable on rectangle textures.

enum class Magnum::GL::SamplerCompareMode: GLenum

Depth texture comparison mode.

Enumerators
None

Directly output the depth value

CompareRefToTexture

Use output from specified SamplerCompareFunction

enum class Magnum::GL::SamplerCompareFunction: GLenum

Texture sampler depth comparison function.

Comparison operator used when comparison mode is set to SamplerCompareMode::CompareRefToTexture.

Enumerators
Never

Always 0.0

Always

Always 1.0

Less

1.0 when texture coordinate is less than depth value, 0.0 otherwise

LessOrEqual

1.0 when texture coordinate is less than or equal to depth value, 0.0 otherwise

Equal

1.0 when texture coordinate is equal to depth value, 0.0 otherwise

NotEqual

0.0 when texture coordinate is equal to depth value, 1.0 otherwise

GreaterOrEqual

1.0 when texture coordinate is greater than or equal to depth value, 0.0 otherwise

Greater

1.0 when texture coordinate is greater than depth value, 0.0 otherwise

enum class Magnum::GL::SamplerDepthStencilMode: GLenum

Texture sampler depth/stencil mode.

Enumerators
DepthComponent

Sample depth component

StencilIndex

Sample stencil index (as unsigned integer texture)

enum class Magnum::GL::TextureFormat: GLenum

Internal texture format.

In most cases you may want to use TextureFormat::R8 (for grayscale textures), TextureFormat::RGB8 or TextureFormat::RGBA8. The matching color format is then PixelFormat::Red, PixelFormat::RGB or PixelFormat::RGBA along with PixelType::UnsignedByte. See documentation of these values for possible limitations when using OpenGL ES 2.0 or WebGL.

Enumerators
Red

Red component, normalized unsigned, size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls, in that case use TextureFormat::R8 instead.

R8

Red component, normalized unsigned byte.

RG

Red and green component, normalized unsigned, size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls, in that case use TextureFormat::RG8 instead.

RG8

Red and green component, each normalized unsigned byte.

RGB

RGB, normalized unsigned, size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls, in that case use TextureFormat::RGB8 instead.

RGB8

RGB, each component normalized unsigned byte.

RGBA

RGBA, normalized unsigned, size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls, in that case use TextureFormat::RGBA8 instead.

RGBA8

RGBA, each component normalized unsigned byte.

R8Snorm

Red component, normalized signed byte.

RG8Snorm

Red and green component, each normalized signed byte.

RGB8Snorm

RGB, each component normalized signed byte.

RGBA8Snorm

RGBA, each component normalized signed byte.

R16

Red component, normalized unsigned short.

RG16

Red and green component, each normalized unsigned short.

RGB16

RGB, each component normalized unsigned short.

RGBA16

RGBA, each component normalized unsigned short.

R16Snorm

Red component, normalized signed short.

RG16Snorm

Red and green component, each normalized signed short.

RGB16Snorm

RGB, each component normalized signed short.

RGBA16Snorm

RGBA, each component normalized signed short.

R8UI

Red component, non-normalized unsigned byte. Can't be filtered using SamplerFilter::Linear.

RG8UI

Red and green component, each non-normalized unsigned byte. Can't be filtered using SamplerFilter::Linear.

RGB8UI

RGB, each component non-normalized unsigned byte. Can't be filtered using SamplerFilter::Linear.

RGBA8UI

RGBA, each component non-normalized unsigned byte. Can't be filtered using SamplerFilter::Linear.

R8I

Red component, non-normalized signed byte. Can't be filtered using SamplerFilter::Linear.

RG8I

Red and green component, each non-normalized signed byte. Can't be filtered using SamplerFilter::Linear.

RGB8I

RGB, each component non-normalized signed byte. Can't be filtered using SamplerFilter::Linear.

RGBA8I

RGBA, each component non-normalized signed byte. Can't be filtered using SamplerFilter::Linear.

R16UI

Red component, non-normalized unsigned short. Can't be filtered using SamplerFilter::Linear.

RG16UI

Red and green component, each non-normalized unsigned short. Can't be filtered using SamplerFilter::Linear.

RGB16UI

RGB, each component non-normalized unsigned short. Can't be filtered using SamplerFilter::Linear.

RGBA16UI

RGBA, each component non-normalized unsigned short. Can't be filtered using SamplerFilter::Linear.

R16I

Red component, non-normalized signed short. Can't be filtered using SamplerFilter::Linear.

RG16I

Red and green component, each non-normalized signed short. Can't be filtered using SamplerFilter::Linear.

RGB16I

RGB, each component non-normalized signed short. Can't be filtered using SamplerFilter::Linear.

RGBA16I

RGBA, each component non-normalized signed short. Can't be filtered using SamplerFilter::Linear.

R32UI

Red component, non-normalized unsigned int. Can't be filtered using SamplerFilter::Linear.

RG32UI

Red and green component, each non-normalized unsigned int. Can't be filtered using SamplerFilter::Linear.

RGB32UI

RGB, each component non-normalized unsigned int. Can't be filtered using SamplerFilter::Linear.

RGBA32UI

RGBA, each component non-normalized unsigned int. Can't be filtered using SamplerFilter::Linear.

R32I

Red component, non-normalized signed int. Can't be filtered using SamplerFilter::Linear.

RG32I

Red and green component, each non-normalized signed int. Can't be filtered using SamplerFilter::Linear.

RGB32I

RGB, each component non-normalized signed int. Can't be filtered using SamplerFilter::Linear.

RGBA32I

RGBA, each component non-normalized signed int. Can't be filtered using SamplerFilter::Linear.

R16F

Red component, half float.

RG16F

Red and green component, each half float.

RGB16F

RGB, each component half float.

RGBA16F

RGBA, each component half float.

R32F

Red component, float.

RG32F

Red and green component, each float.

RGB32F

RGB, each component float.

RGBA32F

RGBA, each component float.

Luminance

Luminance, normalized unsigned, single value used for all RGB channels. Size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls.

LuminanceAlpha

Floating-point luminance and alpha channel. First value is used for all RGB channels, second value is used for alpha channel. Size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls.

R3B3G2

RGB, normalized unsigned, red and green component 3bit, blue 2bit.

RGB4

RGB, each component normalized unsigned 4bit.

RGB5

RGB, each component normalized unsigned 5bit.

RGB565

RGB, normalized unsigned, red and blue component 5bit, green 6bit.

RGB10

RGB, each component normalized unsigned 10bit.

RGB12

RGB, each component normalized unsigned 12bit.

R11FG11FB10F

RGB, float, red and green component 11bit, blue 10bit.

RGB9E5

RGB, unsigned with exponent, each RGB component 9bit, exponent 5bit.

SRGB

sRGB, normalized unsigned, size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls, in that case use TextureFormat::SRGB8 instead.

SRGB8

sRGB, each component normalized unsigned byte.

RGBA2

RGBA, normalized unsigned, each component 2bit.

RGBA4

RGBA, normalized unsigned, each component 4bit.

RGB5A1

RGBA, normalized unsigned, each RGB component 5bit, alpha 1bit.

RGB10A2

RGBA, normalized unsigned, each RGB component 10bit, alpha 2bit.

RGB10A2UI

RGBA, non-normalized unsigned, each RGB component 10bit, alpha 2bit. Can't be filtered using SamplerFilter::Linear.

RGBA12

RGBA, each component normalized unsigned 12bit.

SRGBAlpha

sRGB + linear alpha, normalized unsigned, size implementation-dependent. Not allowed in unemulated *Texture::setStorage() calls, in that case use TextureFormat::SRGB8Alpha8 instead.

SRGB8Alpha8

sRGB + linear alpha, each component normalized unsigned byte.

CompressedRed

Compressed red channel, normalized unsigned. Not available on multisample textures.

CompressedRG

Compressed red and green channel, normalized unsigned. Not available on multisample textures.

CompressedRGB

Compressed RGB, normalized unsigned. Not available on multisample textures.

CompressedRGBA

Compressed RGBA, normalized unsigned. Not available on multisample textures.

CompressedRedRgtc1

RGTC compressed red channel, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGRgtc2

RGTC compressed red and green channel, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSignedRedRgtc1

RGTC compressed red channel, normalized signed. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSignedRGRgtc2

RGTC compressed red and green channel, normalized signed. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBBptcUnsignedFloat

BPTC compressed RGB, unsigned float. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBBptcSignedFloat

BPTC compressed RGB, signed float. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBABptcUnorm

BPTC compressed RGBA, normalized unsigned. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGBAlphaBptcUnorm

BPTC compressed sRGBA, normalized unsigned. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGB8Etc2

ETC2 compressed RGB, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSRGB8Etc2

ETC2 compressed sRGB, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGB8PunchthroughAlpha1Etc2

ETC2 compressed RGB with punchthrough (single-bit) alpha, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSRGB8PunchthroughAlpha1Etc2

ETC2 compressed sRGB with punchthrough (single-bit) alpha, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBA8Etc2Eac

ETC2/EAC compressed RGBA, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Etc2Eac

ETC2/EAC compressed sRGB with alpha, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedR11Eac

EAC compressed red channel, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSignedR11Eac

EAC compressed red channel, normalized signed. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRG11Eac

EAC compressed red and green channel, normalized unsigned. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedSignedRG11Eac

EAC compressed red and green channel, normalized signed. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBS3tcDxt1

S3TC DXT1 compressed RGB. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBAS3tcDxt1

S3TC DXT1 compressed RGBA. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBAS3tcDxt3

S3TC DXT3 compressed RGBA. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBAS3tcDxt5

S3TC DXT5 compressed RGBA. Available only on 2D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc4x4

ASTC compressed RGBA with 4x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc4x4

ASTC compressed sRGB with alpha with 4x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc5x4

ASTC compressed RGBA with 5x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc5x4

ASTC compressed sRGB with alpha with 5x4 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc5x5

ASTC compressed RGBA with 5x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc5x5

ASTC compressed sRGB with alpha with 5x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc6x5

ASTC compressed RGBA with 6x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc6x5

ASTC compressed sRGB with alpha with 6x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc6x6

ASTC compressed RGBA with 6x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc6x6

ASTC compressed sRGB with alpha with 6x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc8x5

ASTC compressed RGBA with 8x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc8x5

ASTC compressed sRGB with alpha with 8x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc8x6

ASTC compressed RGBA with 8x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc8x6

ASTC compressed sRGB with alpha with 8x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc8x8

ASTC compressed RGBA with 8x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc8x8

ASTC compressed sRGB with alpha with 8x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc10x5

ASTC compressed RGBA with 10x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc10x5

ASTC compressed sRGB with alpha with 10x5 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc10x6

ASTC compressed RGBA with 10x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc10x6

ASTC compressed sRGB with alpha with 10x6 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc10x8

ASTC compressed RGBA with 10x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc10x8

ASTC compressed sRGB with alpha with 10x8 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc10x10

ASTC compressed RGBA with 10x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc10x10

ASTC compressed sRGB with alpha with 10x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc12x10

ASTC compressed RGBA with 12x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc12x10

ASTC compressed sRGB with alpha with 12x10 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedRGBAAstc12x12

ASTC compressed RGBA with 12x12 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

CompressedSRGB8Alpha8Astc12x12

ASTC compressed sRGB with alpha with 12x12 blocks. Available only on 2D, 3D, 2D array, cube map and cube map array textures.

DepthComponent

Depth component, size implementation-dependent. Not supported in 3D textures. Not allowed in unemulated *Texture::setStorage() calls, in that case use e.g. TextureFormat::DepthComponent24 instead.

DepthComponent16

Depth component, 16bit. Not supported in 3D textures.

DepthComponent24

Depth component, 24bit. Not supported in 3D textures.

DepthComponent32

Depth component, 32bit. Not supported in 3D textures.

DepthComponent32F

Depth component, 32bit float. Not supported in 3D textures.

StencilIndex8

Stencil index, 8bit. Not supported in 3D textures.

DepthStencil

Depth and stencil component, size implementation-dependent. Not supported in 3D textures. Not allowed in unemulated *Texture::setStorage() calls, in that case use e.g. TextureFormat::Depth24Stencil8 instead.

Depth24Stencil8

24bit depth and 8bit stencil component. Not supported in 3D textures.

Depth32FStencil8

32bit float depth component and 8bit stencil component. Not supported in 3D textures.

enum class Magnum::GL::Version: Int

OpenGL version.

Enumerators
None

Unspecified

GL210

OpenGL 2.1 / GLSL 1.20

GL300

OpenGL 3.0 / GLSL 1.30

GL310

OpenGL 3.1 / GLSL 1.40

GL320

OpenGL 3.2 / GLSL 1.50

GL330

OpenGL 3.3, GLSL 3.30

GL400

OpenGL 4.0, GLSL 4.00

GL410

OpenGL 4.1, GLSL 4.10

GL420

OpenGL 4.2, GLSL 4.20

GL430

OpenGL 4.3, GLSL 4.30

GL440

OpenGL 4.4, GLSL 4.40

GL450

OpenGL 4.5, GLSL 4.50

GL460

OpenGL 4.6, GLSL 4.60

GLES200

OpenGL ES 2.0 or WebGL 1.0, GLSL ES 1.00.

On desktop OpenGL, all related functionality is present in extension ARB_ES2_compatibility (OpenGL 4.1), so testing for this version using Context::isVersionSupported() is equivalent to testing for availability of that extension.

GLES300

OpenGL ES 3.0 or WebGL 2.0, GLSL ES 3.00.

On desktop OpenGL, all related functionality is present in extension ARB_ES3_compatibility (OpenGL 4.3), so testing for this version using Context::isVersionSupported() is equivalent to testing for availability of that extension.

GLES310

OpenGL ES 3.1, GLSL ES 3.10.

On desktop OpenGL, all related functionality is present in extension ARB_ES3_1_compatibility (OpenGL 4.5), so testing for this version using Context::isVersionSupported() is equivalent to testing for availability of that extension.

GLES320

OpenGL ES 3.2, GLSL ES 3.20.

On desktop OpenGL, all related functionality is present in extension ARB_ES3_2_compatibility, so testing for this version using Context::isVersionSupported() is equivalent to testing for availability of that extension.

Typedef documentation

typedef Containers::EnumSet<FramebufferBlit> Magnum::GL::FramebufferBlitMask

Mask for framebuffer blitting.

typedef MultisampleTexture<2> Magnum::GL::MultisampleTexture2D

Two-dimensional multisample texture.

typedef MultisampleTexture<3> Magnum::GL::MultisampleTexture2DArray

Two-dimensional multisample texture array.

typedef Texture<1> Magnum::GL::Texture1D

One-dimensional texture.

typedef Texture<3> Magnum::GL::Texture3D

Three-dimensional texture.

typedef TextureArray<1> Magnum::GL::Texture1DArray

One-dimensional texture array.

typedef TextureArray<2> Magnum::GL::Texture2DArray

Two-dimensional texture array.

Function documentation

template<class T>
Debug& Magnum::GL::operator<<(Debug& debug, Attribute<T>::Components)

Debug output operator.

template<class T>
Debug& Magnum::GL::operator<<(Debug& debug, Attribute<T>::DataType)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Buffer::TargetHint value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Buffer::Target value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Context::Flag value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Context::Flags value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Context::DetectedDriver value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Context::DetectedDrivers value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DebugOutput::Source value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DebugOutput::Type value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DebugOutput::Severity value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DebugMessage::Source value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DebugMessage::Type value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DebugGroup::Source value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, DefaultFramebuffer::Status value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Framebuffer::Status value)

Debug output operator.

MeshPrimitive Magnum::GL::meshPrimitive(Magnum::MeshPrimitive primitive)

Convert generic mesh primitive to OpenGL mesh primitive.

MeshIndexType Magnum::GL::meshIndexType(Magnum::MeshIndexType type)

Convert generic mesh index type to OpenGL mesh index type.

Debug& Magnum::GL::operator<<(Debug& debug, MeshPrimitive value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, MeshIndexType value)

Debug output operator.

bool Magnum::GL::hasPixelFormat(Magnum::PixelFormat format)

Check availability of a generic pixel format.

Some OpenGL targets don't support all generic pixel formats (for example WebGL 1.0 and OpenGL ES 2.0 don't support most of single- and two-component or integer formats). Returns false if current target can't support such format, true otherwise. Moreover, returns true also for all formats that are isPixelFormatImplementationSpecific(). The format value is expected to be valid.

PixelFormat Magnum::GL::pixelFormat(Magnum::PixelFormat format)

Convert a generic pixel format to OpenGL pixel format.

In case isPixelFormatImplementationSpecific() returns false for format, maps it to a corresponding OpenGL pixel format. In case isPixelFormatImplementationSpecific() returns true, assumes format stores OpenGL-specific pixel format and returns pixelFormatUnwrap() cast to GL::PixelFormat.

Not all generic pixel formats may be available on all targets and this function expects that given format is available on the target. Use hasPixelFormat() to query availability of given format.

PixelType Magnum::GL::pixelType(Magnum::PixelFormat format, UnsignedInt extra = 0)

Convert a generic pixel type to OpenGL pixel type.

In case isPixelFormatImplementationSpecific() returns false for format, maps it to a corresponding OpenGL pixel type. In case isPixelFormatImplementationSpecific() returns true, assumes extra stores OpenGL-specific pixel type and returns it cast to GL::PixelType.

Not all generic pixel formats may be available on all targets and this function expects that given format is available on the target. Use hasPixelFormat() to query availability of given format.

UnsignedInt Magnum::GL::pixelSize(PixelFormat format, PixelType type)

Pixel size for given format/type combination (in bytes)

UnsignedInt Magnum::GL::pixelSize(Magnum::PixelFormat format, PixelType type)

Pixel size for given format/type combination (in bytes)

Debug& Magnum::GL::operator<<(Debug& debug, PixelFormat value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, PixelType value)

Debug output operator.

bool Magnum::GL::hasCompressedPixelFormat(Magnum::CompressedPixelFormat format)

Check availability of generic compressed pixel format.

Some OpenGL targets don't support all generic pixel formats (for example ASTC compression might not be available on WebGL 1.0). Returns false if current target can't support such format, true otherwise. Moreover, returns true also for all formats that are isCompressedPixelFormatImplementationSpecific().The format value is expected to be valid.

CompressedPixelFormat Magnum::GL::compressedPixelFormat(Magnum::CompressedPixelFormat format)

Convert generic compressed pixel format to OpenGL compressed pixel format.

In case isCompressedPixelFormatImplementationSpecific() returns false for format, maps it to a corresponding OpenGL pixel format. In case isCompressedPixelFormatImplementationSpecific() returns true, assumes format stores OpenGL-specific pixel format and returns compressedPixelFormatUnwrap() cast to GL::CompressedPixelFormat.

Not all generic pixel formats may be available on all targets and this function expects that given format is available on the target. Use hasCompressedPixelFormat() to query availability of given format.

Debug& Magnum::GL::operator<<(Debug& debug, CompressedPixelFormat value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Renderer::Error value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Renderer::ResetNotificationStrategy value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Renderer::GraphicsResetStatus value)

Debug output operator.

SamplerFilter Magnum::GL::samplerFilter(Magnum::SamplerFilter filter)

Convert generic texture sampler filter mode to OpenGL filter mode.

SamplerMipmap Magnum::GL::samplerMipmap(Magnum::SamplerMipmap mipmap)

Convert generic sampler filter mode to OpenGL filter mode.

bool Magnum::GL::hasSamplerWrapping(Magnum::SamplerWrapping wrapping)

Check availability of a generic sampler wrapping mode.

Some OpenGL targets don't support all generic sampler wrapping modes (for example the SamplerWrapping::MirrorClampToEdge is not available in OpenGL ES or WebGL). Returns false if current target can't support such format, true otherwise. The filter value is expected to be valid.

SamplerWrapping Magnum::GL::samplerWrapping(Magnum::SamplerWrapping wrapping)

Convert generic sampler filter mode to OpenGL filter mode.

Not all generic sampler wrapping modes may be available on all targets and this function expects that given format is available on the target. Use hasSamplerWrapping() to query availability of given mode.

Debug& Magnum::GL::operator<<(Debug& debug, SamplerFilter value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, SamplerMipmap value)

Debug output operator.

template<UnsignedInt dimensions>
Array<dimensions, SamplerWrapping> Magnum::GL::samplerWrapping(const Array<dimensions, Magnum::SamplerWrapping>& wrapping)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Debug& Magnum::GL::operator<<(Debug& debug, SamplerWrapping value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, SamplerCompareMode value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, SamplerCompareFunction value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, SamplerDepthStencilMode value)

Debug output operator.

Debug& Magnum::GL::operator<<(Debug& debug, Shader::Type value)

Debug output operator.

Version Magnum::GL::version(Int major, Int minor) constexpr

Enum value from major and minor version number.

Enum value from major and minor version number.

std::pair<Int, Int> Magnum::GL::version(Version version)

Major and minor version number from enum value.

Major and minor version number from enum value.

bool Magnum::GL::isVersionES(Version version) constexpr

Whether given version is OpenGL ES or WebGL.

Whether given version is OpenGL ES or WebGL.

Always true on OpenGL ES and WebGL build.

Debug& Magnum::GL::operator<<(Debug& debug, Version value)

Debug output operator.