Magnum/GL/PixelFormat.h file

Enum Magnum::GL::PixelFormat, Magnum::GL::PixelType, Magnum::GL::CompressedPixelFormat, function Magnum::GL::hasPixelFormat(), Magnum::GL::pixelFormat(), Magnum::GL::pixelType(), Magnum::GL::pixelFormatSize(), Magnum::GL::genericPixelFormat(), Magnum::GL::hasCompressedPixelFormat(), Magnum::GL::compressedPixelFormat(), Magnum::GL::genericCompressedPixelFormat()

Namespaces

namespace Magnum
Root namespace.
namespace Magnum::GL
OpenGL wrapping layer.

Enums

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, Half = GL_HALF_FLOAT new in 2020.06, HalfFloat deprecated in 2020.06, 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, SRGBS3tcDxt1 = GL_COMPRESSED_SRGB_S3TC_DXT1_EXT new in 2019.10, RGBAS3tcDxt1 = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, SRGBAlphaS3tcDxt1 = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT new in 2019.10, RGBAS3tcDxt3 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, SRGBAlphaS3tcDxt3 = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT new in 2019.10, RGBAS3tcDxt5 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, SRGBAlphaS3tcDxt5 = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT new in 2019.10, 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, RGBAAstc3x3x3 = GL_COMPRESSED_RGBA_ASTC_3x3x3_OES new in 2019.10, SRGB8Alpha8Astc3x3x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES new in 2019.10, RGBAAstc4x3x3 = GL_COMPRESSED_RGBA_ASTC_4x3x3_OES new in 2019.10, SRGB8Alpha8Astc4x3x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES new in 2019.10, RGBAAstc4x4x3 = GL_COMPRESSED_RGBA_ASTC_4x4x3_OES new in 2019.10, SRGB8Alpha8Astc4x4x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES new in 2019.10, RGBAAstc4x4x4 = GL_COMPRESSED_RGBA_ASTC_4x4x4_OES new in 2019.10, SRGB8Alpha8Astc4x4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES new in 2019.10, RGBAAstc5x4x4 = GL_COMPRESSED_RGBA_ASTC_5x4x4_OES new in 2019.10, SRGB8Alpha8Astc5x4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES new in 2019.10, RGBAAstc5x5x4 = GL_COMPRESSED_RGBA_ASTC_5x5x4_OES new in 2019.10, SRGB8Alpha8Astc5x5x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES new in 2019.10, RGBAAstc5x5x5 = GL_COMPRESSED_RGBA_ASTC_5x5x5_OES new in 2019.10, SRGB8Alpha8Astc5x5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES new in 2019.10, RGBAAstc6x5x5 = GL_COMPRESSED_RGBA_ASTC_6x5x5_OES new in 2019.10, SRGB8Alpha8Astc6x5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES new in 2019.10, RGBAAstc6x6x5 = GL_COMPRESSED_RGBA_ASTC_6x6x5_OES new in 2019.10, SRGB8Alpha8Astc6x6x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES new in 2019.10, RGBAAstc6x6x6 = GL_COMPRESSED_RGBA_ASTC_6x6x6_OES new in 2019.10, SRGB8Alpha8Astc6x6x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES new in 2019.10, RGBPvrtc2bppV1 = GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG new in 2019.10, SRGBPvrtc2bppV1 = GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT new in 2019.10, RGBAPvrtc2bppV1 = GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG new in 2019.10, SRGBAlphaPvrtc2bppV1 = GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT new in 2019.10, RGBPvrtc4bppV1 = GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG new in 2019.10, SRGBPvrtc4bppV1 = GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT new in 2019.10, RGBAPvrtc4bppV1 = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG new in 2019.10, SRGBAlphaPvrtc4bppV1 = GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT new in 2019.10 }
Format of compressed pixel data.

Functions

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 format to OpenGL pixel type.
auto pixelFormatSize(PixelFormat format, PixelType type) -> UnsignedInt
Size of a pixel for given format/type combination in bytes.
auto pixelSize(PixelFormat format, PixelType type) -> UnsignedInt deprecated in Git master
Size of a pixel for given format/type combination in bytes.
auto genericPixelFormat(PixelFormat format, PixelType type) -> Containers::Optional<Magnum::PixelFormat> new in Git master
Convert OpenGL pixel format and type combination to a generic pixel format.
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 genericCompressedPixelFormat(CompressedPixelFormat format) -> Containers::Optional<Magnum::CompressedPixelFormat> new in Git master
Convert OpenGL compressed pixel format to a generic compressed pixel format.
auto operator<<(Debug& debug, CompressedPixelFormat value) -> Debug&
Debug output operator.