Magnum namespace

Root namespace.

Base classes and typedefs.

This library is built as part of Magnum by default. To use this library with CMake, find the Magnum package and link to the Magnum::Magnum target:

find_package(Magnum REQUIRED)

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

Parts of this library are additionally available in a form of single-header libraries. See Downloading and building and Usage with CMake for more information.

Namespaces

namespace Animation
Keyframe-based animation.
namespace Audio
Audio playback.
namespace BulletIntegration
Integration with Bullet Physics.
namespace DartIntegration
Integration with DART Dynamic Animation and Robotics Toolkit.
namespace DebugTools
Debug tools.
namespace EigenIntegration new in 2019.10
Integration with Eigen.
namespace GL
OpenGL wrapping layer.
namespace GlmIntegration
Integration with OpenGL Mathematics (GLM)
namespace ImGuiIntegration
Integration with Dear ImGui.
namespace MaterialTools new in Git master
Material tools.
namespace Math
Math library.
namespace MeshTools
Mesh tools.
namespace OpenDdl
OpenDDL parser.
namespace OvrIntegration
Integration with the Oculus SDK (LibOVR)
namespace Platform
Platform-specific application and context creation.
namespace Primitives
Primitive library.
namespace SceneGraph
Scene graph library.
namespace SceneTools new in Git master
Scene tools.
namespace Shaders
Builtin shaders.
namespace ShaderTools new in Git master
Shader tools.
namespace Text
Text rendering.
namespace TextureTools
Texture tools.
namespace Trade
Data format exchange.
namespace Ui
UI library.
namespace Vk
Vulkan wrapping layer.

Classes

template<class T>
class AbstractResourceLoader
Base for resource loaders.
template<UnsignedInt dimensions, class T>
class Array deprecated in Git master
Array.
template<class T>
class Array1D deprecated in Git master
One-dimensional array.
template<class T>
class Array2D deprecated in Git master
Two-dimensional array.
template<class T>
class Array3D deprecated in Git master
Three-dimensional array.
template<UnsignedInt dimensions>
class CompressedImage
Compressed image.
template<UnsignedInt dimensions, class T>
class CompressedImageView
Compressed image view.
class CompressedPixelStorage
Compressed pixel storage parameters.
template<UnsignedInt dimensions, class T>
struct DimensionTraits
Matrix and vector specializations for given dimension count.
template<UnsignedInt dimensions>
class Image
Image.
template<UnsignedInt dimensions, class T>
class ImageView
Image view.
struct NoAllocateT new in Git master
No allocation tag type.
class PixelStorage
Pixel storage parameters.
template<class T, class U = T>
class Resource
Resource reference.
class ResourceKey
Key for accessing resource.
template<class... Types>
class ResourceManager
Resource manager.
class Timeline
Timeline.

Enums

enum class InputFileCallbackPolicy: UnsignedByte { LoadTemporary, LoadPermanent, LoadPernament = LoadPermanent deprecated in 2019.10, Close } new in 2019.10
Input file callback policy.
enum class ImageFlag1D: UnsignedShort { } new in Git master
1D image layout flag
enum class ImageFlag2D: UnsignedShort { Array = 1 << 0 } new in Git master
2D image layout flag
enum class ImageFlag3D: UnsignedShort { Array = 1 << 0, CubeMap = 1 << 1 } new in Git master
3D image layout flag
enum class MeshPrimitive: UnsignedInt { Points = 1, Lines, LineLoop, LineStrip, Triangles, TriangleStrip, TriangleFan, Instances new in 2020.06, Faces new in 2020.06, Edges new in 2020.06, Meshlets new in Git master }
Mesh primitive type.
enum class MeshIndexType: UnsignedInt { UnsignedByte = 1, UnsignedShort, UnsignedInt }
Mesh index type.
enum class PixelFormat: UnsignedInt { R8Unorm = 1, RG8Unorm, RGB8Unorm, RGBA8Unorm, R8Snorm, RG8Snorm, RGB8Snorm, RGBA8Snorm, R8Srgb new in 2019.10, RG8Srgb new in 2019.10, RGB8Srgb new in 2019.10, RGBA8Srgb new in 2019.10, R8UI, RG8UI, RGB8UI, RGBA8UI, R8I, RG8I, RGB8I, RGBA8I, R16Unorm, RG16Unorm, RGB16Unorm, RGBA16Unorm, R16Snorm, RG16Snorm, RGB16Snorm, RGBA16Snorm, R16UI, RG16UI, RGB16UI, RGBA16UI, R16I, RG16I, RGB16I, RGBA16I, R32UI, RG32UI, RGB32UI, RGBA32UI, R32I, RG32I, RGB32I, RGBA32I, R16F, RG16F, RGB16F, RGBA16F, R32F, RG32F, RGB32F, RGBA32F, Depth16Unorm new in Git master, Depth24Unorm new in Git master, Depth32F new in Git master, Stencil8UI new in Git master, Depth16UnormStencil8UI new in Git master, Depth24UnormStencil8UI new in Git master, Depth32FStencil8UI new in Git master }
Format of pixel data.
enum class CompressedPixelFormat: UnsignedInt { Bc1RGBUnorm = 1, Bc1RGBSrgb new in 2019.10, Bc1RGBAUnorm, Bc1RGBASrgb new in 2019.10, Bc2RGBAUnorm, Bc2RGBASrgb new in 2019.10, Bc3RGBAUnorm, Bc3RGBASrgb new in 2019.10, Bc4RUnorm new in 2019.10, Bc4RSnorm new in 2019.10, Bc5RGUnorm new in 2019.10, Bc5RGSnorm new in 2019.10, Bc6hRGBUfloat new in 2019.10, Bc6hRGBSfloat new in 2019.10, Bc7RGBAUnorm new in 2019.10, Bc7RGBASrgb new in 2019.10, EacR11Unorm new in 2019.10, EacR11Snorm new in 2019.10, EacRG11Unorm new in 2019.10, EacRG11Snorm new in 2019.10, Etc2RGB8Unorm new in 2019.10, Etc2RGB8Srgb new in 2019.10, Etc2RGB8A1Unorm new in 2019.10, Etc2RGB8A1Srgb new in 2019.10, Etc2RGBA8Unorm new in 2019.10, Etc2RGBA8Srgb new in 2019.10, Astc4x4RGBAUnorm new in 2019.10, Astc4x4RGBASrgb new in 2019.10, Astc4x4RGBAF new in 2019.10, Astc5x4RGBAUnorm new in 2019.10, Astc5x4RGBASrgb new in 2019.10, Astc5x4RGBAF new in 2019.10, Astc5x5RGBAUnorm new in 2019.10, Astc5x5RGBASrgb new in 2019.10, Astc5x5RGBAF new in 2019.10, Astc6x5RGBAUnorm new in 2019.10, Astc6x5RGBASrgb new in 2019.10, Astc6x5RGBAF new in 2019.10, Astc6x6RGBAUnorm new in 2019.10, Astc6x6RGBASrgb new in 2019.10, Astc6x6RGBAF new in 2019.10, Astc8x5RGBAUnorm new in 2019.10, Astc8x5RGBASrgb new in 2019.10, Astc8x5RGBAF new in 2019.10, Astc8x6RGBAUnorm new in 2019.10, Astc8x6RGBASrgb new in 2019.10, Astc8x6RGBAF new in 2019.10, Astc8x8RGBAUnorm new in 2019.10, Astc8x8RGBASrgb new in 2019.10, Astc8x8RGBAF new in 2019.10, Astc10x5RGBAUnorm new in 2019.10, Astc10x5RGBASrgb new in 2019.10, Astc10x5RGBAF new in 2019.10, Astc10x6RGBAUnorm new in 2019.10, Astc10x6RGBASrgb new in 2019.10, Astc10x6RGBAF new in 2019.10, Astc10x8RGBAUnorm new in 2019.10, Astc10x8RGBASrgb new in 2019.10, Astc10x8RGBAF new in 2019.10, Astc10x10RGBAUnorm new in 2019.10, Astc10x10RGBASrgb new in 2019.10, Astc10x10RGBAF new in 2019.10, Astc12x10RGBAUnorm new in 2019.10, Astc12x10RGBASrgb new in 2019.10, Astc12x10RGBAF new in 2019.10, Astc12x12RGBAUnorm new in 2019.10, Astc12x12RGBASrgb new in 2019.10, Astc12x12RGBAF new in 2019.10, Astc3x3x3RGBAUnorm new in 2019.10, Astc3x3x3RGBASrgb new in 2019.10, Astc3x3x3RGBAF new in 2019.10, Astc4x3x3RGBAUnorm new in 2019.10, Astc4x3x3RGBASrgb new in 2019.10, Astc4x3x3RGBAF new in 2019.10, Astc4x4x3RGBAUnorm new in 2019.10, Astc4x4x3RGBASrgb new in 2019.10, Astc4x4x3RGBAF new in 2019.10, Astc4x4x4RGBAUnorm new in 2019.10, Astc4x4x4RGBASrgb new in 2019.10, Astc4x4x4RGBAF new in 2019.10, Astc5x4x4RGBAUnorm new in 2019.10, Astc5x4x4RGBASrgb new in 2019.10, Astc5x4x4RGBAF new in 2019.10, Astc5x5x4RGBAUnorm new in 2019.10, Astc5x5x4RGBASrgb new in 2019.10, Astc5x5x4RGBAF new in 2019.10, Astc5x5x5RGBAUnorm new in 2019.10, Astc5x5x5RGBASrgb new in 2019.10, Astc5x5x5RGBAF new in 2019.10, Astc6x5x5RGBAUnorm new in 2019.10, Astc6x5x5RGBASrgb new in 2019.10, Astc6x5x5RGBAF new in 2019.10, Astc6x6x5RGBAUnorm new in 2019.10, Astc6x6x5RGBASrgb new in 2019.10, Astc6x6x5RGBAF new in 2019.10, Astc6x6x6RGBAUnorm new in 2019.10, Astc6x6x6RGBASrgb new in 2019.10, Astc6x6x6RGBAF new in 2019.10, PvrtcRGB2bppUnorm new in 2019.10, PvrtcRGB2bppSrgb new in 2019.10, PvrtcRGBA2bppUnorm new in 2019.10, PvrtcRGBA2bppSrgb new in 2019.10, PvrtcRGB4bppUnorm new in 2019.10, PvrtcRGB4bppSrgb new in 2019.10, PvrtcRGBA4bppUnorm new in 2019.10, PvrtcRGBA4bppSrgb new in 2019.10 }
Format of compressed pixel data.
enum class ResourceState: UnsignedByte { NotLoaded, NotLoadedFallback, Loading, LoadingFallback, NotFound, NotFoundFallback, Mutable, Final }
Resource state.
enum class ResourceDataState: UnsignedByte { Loading = UnsignedByte(ResourceState::Loading), NotFound = UnsignedByte(ResourceState::NotFound), Mutable = UnsignedByte(ResourceState::Mutable), Final = UnsignedByte(ResourceState::Final) }
Resource data state.
enum class ResourcePolicy: UnsignedByte { Resident, Manual, ReferenceCounted }
Resource policy.
enum class SamplerFilter: UnsignedInt { Nearest = 0, Linear }
Texture sampler filtering.
enum class SamplerMipmap: UnsignedInt { Base = 0, Nearest, Linear }
Texture sampler mip level selection.
enum class SamplerWrapping: UnsignedInt { Repeat = 0, MirroredRepeat, ClampToEdge, ClampToBorder, MirrorClampToEdge }
Texture sampler wrapping.
enum class VertexFormat: UnsignedInt { Float = 1, Half, Double, UnsignedByte, UnsignedByteNormalized, Byte, ByteNormalized, UnsignedShort, UnsignedShortNormalized, Short, ShortNormalized, UnsignedInt, Int, Vector2, Vector2h, Vector2d, Vector2ub, Vector2ubNormalized, Vector2b, Vector2bNormalized, Vector2us, Vector2usNormalized, Vector2s, Vector2sNormalized, Vector2ui, Vector2i, Vector3, Vector3h, Vector3d, Vector3ub, Vector3ubNormalized, Vector3b, Vector3bNormalized, Vector3us, Vector3usNormalized, Vector3s, Vector3sNormalized, Vector3ui, Vector3i, Vector4, Vector4h, Vector4d, Vector4ub, Vector4ubNormalized, Vector4b, Vector4bNormalized, Vector4us, Vector4usNormalized, Vector4s, Vector4sNormalized, Vector4ui, Vector4i, Matrix2x2, Matrix2x2h, Matrix2x2d, Matrix2x2bNormalized, Matrix2x2sNormalized, Matrix2x3, Matrix2x3h, Matrix2x3d, Matrix2x3bNormalized, Matrix2x3sNormalized, Matrix2x4, Matrix2x4h, Matrix2x4d, Matrix2x4bNormalized, Matrix2x4sNormalized, Matrix2x2bNormalizedAligned, Matrix2x3hAligned, Matrix2x3bNormalizedAligned, Matrix2x3sNormalizedAligned, Matrix3x2, Matrix3x2h, Matrix3x2d, Matrix3x2bNormalized, Matrix3x2sNormalized, Matrix3x3, Matrix3x3h, Matrix3x3d, Matrix3x3bNormalized, Matrix3x3sNormalized, Matrix3x4, Matrix3x4h, Matrix3x4d, Matrix3x4bNormalized, Matrix3x4sNormalized, Matrix3x2bNormalizedAligned, Matrix3x3hAligned, Matrix3x3bNormalizedAligned, Matrix3x3sNormalizedAligned, Matrix4x2, Matrix4x2h, Matrix4x2d, Matrix4x2bNormalized, Matrix4x2sNormalized, Matrix4x3, Matrix4x3h, Matrix4x3d, Matrix4x3bNormalized, Matrix4x3sNormalized, Matrix4x4, Matrix4x4h, Matrix4x4d, Matrix4x4bNormalized, Matrix4x4sNormalized, Matrix4x2bNormalizedAligned, Matrix4x3hAligned, Matrix4x3bNormalizedAligned, Matrix4x3sNormalizedAligned } new in 2020.06
Vertex format.

Typedefs

template<UnsignedInt dimensions, class T>
using VectorTypeFor = typename DimensionTraits<dimensions, T>::VectorType
Vector type for given dimension count and type.
template<UnsignedInt dimensions, class T>
using RangeTypeFor = typename DimensionTraits<dimensions, T>::RangeType
Range type for given dimension count and type.
template<UnsignedInt dimensions, class T>
using MatrixTypeFor = typename DimensionTraits<dimensions, T>::MatrixType
Matrix type for given dimension count and type.
using Image1D = Image<1>
One-dimensional image.
using Image2D = Image<2>
Two-dimensional image.
using Image3D = Image<3>
Three-dimensional image.
using CompressedImage1D = CompressedImage<1>
One-dimensional compressed image.
using CompressedImage2D = CompressedImage<2>
Two-dimensional compressed image.
using CompressedImage3D = CompressedImage<3>
Three-dimensional compressed image.
using ImageFlags1D = Containers::EnumSet<ImageFlag1D> new in Git master
1D image layout flags
using ImageFlags2D = Containers::EnumSet<ImageFlag2D> new in Git master
2D image layout flags
using ImageFlags3D = Containers::EnumSet<ImageFlag3D> new in Git master
3D image layout flags
template<UnsignedInt dimensions>
using ImageFlag = typename Implementation::ImageFlagTraits<dimensions>::Type new in Git master
Image layout flag.
template<UnsignedInt dimensions>
using ImageFlags = typename Implementation::ImageFlagTraits<dimensions>::SetType new in Git master
Image layout flags.
template<UnsignedInt dimensions>
using BasicImageView = ImageView<dimensions, const char> new in 2019.10
Const image view.
using ImageView1D = BasicImageView<1>
One-dimensional image view.
using ImageView2D = BasicImageView<2>
Two-dimensional image view.
using ImageView3D = BasicImageView<3>
Three-dimensional image view.
template<UnsignedInt dimensions>
using BasicMutableImageView = ImageView<dimensions, char> new in 2019.10
Mutable image view.
using MutableImageView1D = BasicMutableImageView<1> new in 2019.10
One-dimensional mutable image view.
using MutableImageView2D = BasicMutableImageView<2> new in 2019.10
Two-dimensional mutable image view.
using MutableImageView3D = BasicMutableImageView<3> new in 2019.10
Three-dimensional mutable image view.
template<UnsignedInt dimensions>
using BasicCompressedImageView = CompressedImageView<dimensions, const char> new in 2019.10
Const compressed image view.
using CompressedImageView1D = BasicCompressedImageView<1>
One-dimensional compressed image view.
using CompressedImageView2D = BasicCompressedImageView<2>
Two-dimensional compressed image view.
using CompressedImageView3D = BasicCompressedImageView<3>
Three-dimensional compressed image view.
template<UnsignedInt dimensions>
using BasicMutableCompressedImageView = CompressedImageView<dimensions, char> new in 2019.10
Mutable compressed image view.
using MutableCompressedImageView1D = BasicMutableCompressedImageView<1> new in 2019.10
One-dimensional mutable compressed image view.
using MutableCompressedImageView2D = BasicMutableCompressedImageView<2> new in 2019.10
Two-dimensional mutable compressed image view.
using MutableCompressedImageView3D = BasicMutableCompressedImageView<3> new in 2019.10
Three-dimensional mutable compressed image view.
using Debug = Corrade::Utility::Debug
Alias for debug output.
using Warning = Corrade::Utility::Warning
Alias for warning output.
using Error = Corrade::Utility::Error
Alias for error output.
using Fatal = Corrade::Utility::Fatal
Alias for fatal output.
using DefaultInitT = Corrade::DefaultInitT new in Git master
Default initialization tag type.
using NoInitT = Corrade::NoInitT new in 2020.06
No initialization tag type.
using NoCreateT = Corrade::NoCreateT
No creation tag type.

Functions

template<UnsignedInt dimensions, class T>
auto operator<<(Debug& debug, const Array<dimensions, T>& value) -> Debug& deprecated in Git master
Debug output operator.
template<class T>
auto operator<<(Debug& debug, const Array1D<T>& value) -> Debug& deprecated in Git master
Debug output operator.
template<class T>
auto operator<<(Debug& debug, const Array2D<T>& value) -> Debug& deprecated in Git master
Debug output operator.
template<class T>
auto operator<<(Debug& debug, const Array3D<T>& value) -> Debug& deprecated in Git master
Debug output operator.
auto operator<<(Debug& debug, InputFileCallbackPolicy value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, ImageFlag1D value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, ImageFlag2D value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, ImageFlag3D value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, ImageFlags1D value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, ImageFlags2D value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, ImageFlags3D value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, MeshPrimitive value) -> Debug&
Debug output operator.
auto isMeshPrimitiveImplementationSpecific(MeshPrimitive primitive) -> bool constexpr new in 2020.06
Whether a MeshPrimitive value wraps an implementation-specific identifier.
template<class T>
auto meshPrimitiveWrap(T implementationSpecific) -> MeshPrimitive constexpr new in 2020.06
Wrap an implementation-specific mesh primitive identifier in MeshPrimitive.
template<class T = UnsignedInt>
auto meshPrimitiveUnwrap(MeshPrimitive primitive) -> T constexpr new in 2020.06
Unwrap an implementation-specific mesh primitive identifier from MeshPrimitive.
auto operator<<(Debug& debug, MeshIndexType value) -> Debug&
Debug output operator.
auto isMeshIndexTypeImplementationSpecific(MeshIndexType type) -> bool constexpr new in Git master
Whether a MeshIndexType value wraps an implementation-specific identifier.
template<class T>
auto meshIndexTypeWrap(T implementationSpecific) -> MeshIndexType constexpr new in Git master
Wrap an implementation-specific mesh index type identifier in MeshIndexType.
template<class T = UnsignedInt>
auto meshIndexTypeUnwrap(MeshIndexType type) -> T constexpr new in Git master
Unwrap an implementation-specific mesh index type identifier from MeshIndexType.
auto meshIndexTypeSize(MeshIndexType type) -> UnsignedInt
Size of given mesh index type.
auto pixelFormatSize(PixelFormat format) -> UnsignedInt new in Git master
Size of given pixel format.
auto pixelFormatChannelFormat(PixelFormat format) -> PixelFormat new in Git master
Channel format of given pixel format.
auto pixelFormatChannelCount(PixelFormat format) -> UnsignedInt new in Git master
Channel count of given pixel format.
auto isPixelFormatNormalized(PixelFormat format) -> bool new in Git master
Whether given pixel format is normalized.
auto isPixelFormatIntegral(PixelFormat format) -> bool new in Git master
Whether given pixel format is integral.
auto isPixelFormatFloatingPoint(PixelFormat format) -> bool new in Git master
Whether given pixel format is floating-point.
auto isPixelFormatSrgb(PixelFormat format) -> bool new in Git master
Whether given pixel format is sRGB.
auto isPixelFormatDepthOrStencil(PixelFormat format) -> bool new in Git master
Whether given pixel format is depth or stenil.
auto pixelFormat(PixelFormat format, UnsignedInt channelCount, bool srgb) -> PixelFormat new in Git master
Assemble a pixel format from parts.
auto pixelSize(PixelFormat format) -> UnsignedInt deprecated in Git master
Size of given pixel format.
auto operator<<(Debug& debug, PixelFormat value) -> Debug&
Debug output operator.
auto isPixelFormatImplementationSpecific(PixelFormat format) -> bool constexpr
Whether a PixelFormat value wraps an implementation-specific identifier.
template<class T>
auto pixelFormatWrap(T implementationSpecific) -> PixelFormat constexpr
Wrap an implementation-specific pixel format identifier in PixelFormat.
template<class T = UnsignedInt>
auto pixelFormatUnwrap(PixelFormat format) -> T constexpr
Unwrap an implementation-specific pixel format identifier from PixelFormat.
auto compressedPixelFormatBlockSize(CompressedPixelFormat format) -> Vector3i new in Git master
Block size of given compressed pixel format.
auto compressedBlockSize(CompressedPixelFormat format) -> Vector3i deprecated in Git master
Block size of given compressed pixel format.
auto compressedPixelFormatBlockDataSize(CompressedPixelFormat format) -> UnsignedInt new in Git master
Block data size of given compressed pixel format.
auto compressedBlockDataSize(CompressedPixelFormat format) -> UnsignedInt deprecated in Git master
Block data size of given compressed pixel format.
auto operator<<(Debug& debug, CompressedPixelFormat value) -> Debug&
Debug output operator.
auto isCompressedPixelFormatImplementationSpecific(CompressedPixelFormat format) -> bool constexpr
Whether a CompressedPixelFormat value wraps an implementation-specific identifier.
template<class T>
auto compressedPixelFormatWrap(T implementationSpecific) -> CompressedPixelFormat constexpr
Wrap an implementation-specific pixel format identifier in a CompressedPixelFormat.
template<class T = UnsignedInt>
auto compressedPixelFormatUnwrap(CompressedPixelFormat format) -> T constexpr
Unwrap an implementation-specific pixel format identifier from a CompressedPixelFormat.
auto operator<<(Debug& debug, ResourceState value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, const ResourceKey& value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerFilter value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerMipmap value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, SamplerWrapping value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, VertexFormat value) -> Debug& new in 2020.06
Debug output operator.
auto isVertexFormatImplementationSpecific(VertexFormat format) -> bool constexpr new in 2020.06
Whether a VertexFormat value wraps an implementation-specific identifier.
template<class T>
auto vertexFormatWrap(T implementationSpecific) -> VertexFormat constexpr new in 2020.06
Wrap an implementation-specific vertex format identifier in VertexFormat.
template<class T = UnsignedInt>
auto vertexFormatUnwrap(VertexFormat format) -> T constexpr new in 2020.06
Unwrap an implementation-specific vertex format identifier from VertexFormat.
auto vertexFormatSize(VertexFormat format) -> UnsignedInt new in 2020.06
Size of given vertex format.
auto vertexFormatComponentFormat(VertexFormat format) -> VertexFormat new in 2020.06
Component format of given vertex format.
auto vertexFormatComponentCount(VertexFormat format) -> UnsignedInt new in 2020.06
Component count of given vertex format.
auto vertexFormatVectorCount(VertexFormat format) -> UnsignedInt new in 2020.06
Vector count of given vertex format.
auto vertexFormatVectorStride(VertexFormat format) -> UnsignedInt new in 2020.06
Vector stride of given vertex format.
auto isVertexFormatNormalized(VertexFormat format) -> bool new in 2020.06
Whether given vertex format is normalized.
auto vertexFormat(VertexFormat format, UnsignedInt componentCount, bool normalized) -> VertexFormat new in 2020.06
Assemble a vertex format from parts.
auto vertexFormat(VertexFormat format, UnsignedInt vectorCount, UnsignedInt componentCount, bool aligned) -> VertexFormat new in 2020.06
Assemble a matrix vertex format from parts.

Variables

DefaultInitT DefaultInit constexpr new in Git master
Default initialization tag.
NoInitT NoInit constexpr new in 2020.06
No initialization tag.
NoCreateT NoCreate constexpr
No creation tag.
NoAllocateT NoAllocate constexpr new in Git master
No allocation tag.

Basic type definitions

See Math type system for more information.

using UnsignedByte = std::uint8_t
Unsigned byte (8bit)
using Byte = std::int8_t
Signed byte (8bit)
using UnsignedShort = std::uint16_t
Unsigned short (16bit)
using Short = std::int16_t
Signed short (16bit)
using UnsignedInt = std::uint32_t
Unsigned int (32bit)
using Int = std::int32_t
Signed int (32bit)
using UnsignedLong = std::uint64_t
Unsigned long (64bit)
using Long = std::int64_t
Signed long (64bit)
using Float = float
Float (32bit)
using Half = Math::Half
Half (16bit)
using BitVector2 = Math::BitVector<2> new in Git master
Two-component vector of bits.
using BitVector3 = Math::BitVector<3> new in Git master
Three-component vector of bits.
using BitVector4 = Math::BitVector<4> new in Git master
Four-component vector of bits.
using BoolVector2 = BitVector2 deprecated in Git master
Two-component vector of bits.
using BoolVector3 = BitVector3 deprecated in Git master
Three-component vector of bits.
using BoolVector4 = BitVector4 deprecated in Git master
Four-component vector of bits.
using Vector2 = Math::Vector2<Float>
Two-component float vector.
using Vector3 = Math::Vector3<Float>
Three-component float vector.
using Vector4 = Math::Vector4<Float>
Four-component float vector.
using Vector2ub = Math::Vector2<UnsignedByte> new in 2020.06
Two-component unsigned byte vector.
using Vector3ub = Math::Vector3<UnsignedByte> new in 2020.06
Three-component unsigned byte vector.
using Vector4ub = Math::Vector4<UnsignedByte> new in 2020.06
Four-component unsigned byte vector.
using Vector2b = Math::Vector2<Byte> new in 2020.06
Two-component signed byte vector.
using Vector3b = Math::Vector3<Byte> new in 2020.06
Three-component signed byte vector.
using Vector4b = Math::Vector4<Byte> new in 2020.06
Four-component signed byte vector.
using Vector2us = Math::Vector2<UnsignedShort> new in 2020.06
Two-component unsigned short vector.
using Vector3us = Math::Vector3<UnsignedShort> new in 2020.06
Three-component unsigned short vector.
using Vector4us = Math::Vector4<UnsignedShort> new in 2020.06
Four-component unsigned short vector.
using Vector2s = Math::Vector2<Short> new in 2020.06
Two-component signed short vector.
using Vector3s = Math::Vector3<Short> new in 2020.06
Three-component signed short vector.
using Vector4s = Math::Vector4<Short> new in 2020.06
Four-component signed short vector.
using Vector2ui = Math::Vector2<UnsignedInt>
Two-component unsigned integer vector.
using Vector3ui = Math::Vector3<UnsignedInt>
Three-component unsigned integer vector.
using Vector4ui = Math::Vector4<UnsignedInt>
Four-component unsigned integer vector.
using Vector2i = Math::Vector2<Int>
Two-component signed integer vector.
using Vector3i = Math::Vector3<Int>
Three-component signed integer vector.
using Vector4i = Math::Vector4<Int>
Four-component signed integer vector.
using Color3 = Math::Color3<Float>
Three-component (RGB) float color.
using Color4 = Math::Color4<Float>
Four-component (RGBA) float color.
using ColorHsv = Math::ColorHsv<Float>
HSV float color.
using Color3ub = Math::Color3<UnsignedByte>
Three-component (RGB) unsigned byte color.
using Color3us = Math::Color3<UnsignedShort> new in 2020.06
Three-component (RGB) unsigned short color.
using Color4ub = Math::Color4<UnsignedByte>
Four-component (RGBA) unsigned byte color.
using Color4us = Math::Color4<UnsignedShort> new in 2020.06
Four-component (RGB) unsigned short color.
using Matrix3 = Math::Matrix3<Float>
3x3 float transformation matrix
using Matrix4 = Math::Matrix4<Float>
4x4 float transformation matrix
using Matrix2x2 = Math::Matrix2x2<Float>
2x2 float matrix
using Matrix3x3 = Math::Matrix3x3<Float>
3x3 float matrix
using Matrix4x4 = Math::Matrix4x4<Float>
4x4 float matrix
using Matrix2x3 = Math::Matrix2x3<Float>
Float matrix with 2 columns and 3 rows.
using Matrix3x2 = Math::Matrix3x2<Float>
Float matrix with 3 columns and 2 rows.
using Matrix2x4 = Math::Matrix2x4<Float>
Float matrix with 2 columns and 4 rows.
using Matrix4x2 = Math::Matrix4x2<Float>
Float matrix with 4 columns and 2 rows.
using Matrix3x4 = Math::Matrix3x4<Float>
Float matrix with 3 columns and 4 rows.
using Matrix4x3 = Math::Matrix4x3<Float>
Float matrix with 4 columns and 3 rows.
using Matrix2x2b = Math::Matrix2x2<Byte> new in 2020.06
Signed byte matrix with 2 columns and 2 rows.
using Matrix2x3b = Math::Matrix2x3<Byte> new in 2020.06
Signed byte matrix with 2 columns and 3 rows.
using Matrix2x4b = Math::Matrix2x4<Byte> new in 2020.06
Signed byte matrix with 2 columns and 4 rows.
using Matrix3x2b = Math::Matrix3x2<Byte> new in 2020.06
Signed byte matrix with 3 columns and 2 rows.
using Matrix3x3b = Math::Matrix3x3<Byte> new in 2020.06
Signed byte matrix with 3 columns and 3 rows.
using Matrix3x4b = Math::Matrix3x4<Byte> new in 2020.06
Signed byte matrix with 3 columns and 4 rows.
using Matrix4x2b = Math::Matrix4x2<Byte> new in 2020.06
Signed byte matrix with 4 columns and 2 rows.
using Matrix4x3b = Math::Matrix4x3<Byte> new in 2020.06
Signed byte matrix with 4 columns and 3 rows.
using Matrix4x4b = Math::Matrix4x4<Byte> new in 2020.06
Signed byte matrix with 4 columns and 4 rows.
using Matrix2x2s = Math::Matrix2x2<Short> new in 2020.06
Signed short matrix with 2 columns and 2 rows.
using Matrix2x3s = Math::Matrix2x3<Short> new in 2020.06
Signed short matrix with 2 columns and 3 rows.
using Matrix2x4s = Math::Matrix2x4<Short> new in 2020.06
Signed short matrix with 2 columns and 4 rows.
using Matrix3x2s = Math::Matrix3x2<Short> new in 2020.06
Signed short matrix with 3 columns and 2 rows.
using Matrix3x3s = Math::Matrix3x3<Short> new in 2020.06
Signed short matrix with 3 columns and 3 rows.
using Matrix3x4s = Math::Matrix3x4<Short> new in 2020.06
Signed short matrix with 3 columns and 4 rows.
using Matrix4x2s = Math::Matrix4x2<Short> new in 2020.06
Signed short matrix with 4 columns and 2 rows.
using Matrix4x3s = Math::Matrix4x3<Short> new in 2020.06
Signed short matrix with 4 columns and 3 rows.
using Matrix4x4s = Math::Matrix4x4<Short> new in 2020.06
Signed short matrix with 4 columns and 4 rows.
using QuadraticBezier2D = Math::QuadraticBezier2D<Float>
Float two-dimensional quadratic Bézier curve.
using QuadraticBezier3D = Math::QuadraticBezier3D<Float>
Float three-dimensional quadratic Bézier curve.
using CubicBezier2D = Math::CubicBezier2D<Float>
Float two-dimensional cubic Bézier curve.
using CubicBezier3D = Math::CubicBezier3D<Float>
Float three-dimensional cubic Bézier curve.
using CubicHermite1D = Math::CubicHermite1D<Float>
Float scalar cubic Hermite spline point.
using CubicHermite2D = Math::CubicHermite2D<Float>
Float two-dimensional cubic Hermite spline point.
using CubicHermite3D = Math::CubicHermite3D<Float>
Float three-dimensional cubic Hermite spline point.
using CubicHermiteComplex = Math::CubicHermiteComplex<Float>
Float cubic Hermite spline complex number.
using CubicHermiteQuaternion = Math::CubicHermiteQuaternion<Float>
Float cubic Hermite spline quaternion.
using Complex = Math::Complex<Float>
Float complex number.
using DualComplex = Math::DualComplex<Float>
Float dual complex number.
using Quaternion = Math::Quaternion<Float>
Float quaternion.
using DualQuaternion = Math::DualQuaternion<Float>
Float dual quaternion.
using Constants = Math::Constants<Float>
Float constants.
using Deg = Math::Deg<Float>
Angle in float degrees.
using Rad = Math::Rad<Float>
Angle in float radians.
using Range1D = Math::Range1D<Float>
One-dimensional float range.
using Range2D = Math::Range2D<Float>
Two-dimensional float range.
using Range3D = Math::Range3D<Float>
Three-dimensional float range.
using Range1Dui = Math::Range1D<UnsignedInt> new in Git master
One-dimensional unsigned integer range.
using Range2Dui = Math::Range2D<UnsignedInt> new in Git master
Two-dimensional unsigned integer range.
using Range3Dui = Math::Range3D<UnsignedInt> new in Git master
Three-dimensional unsigned integer range.
using Range1Di = Math::Range1D<Int>
One-dimensional signed integer range.
using Range2Di = Math::Range2D<Int>
Two-dimensional signed integer range.
using Range3Di = Math::Range3D<Int>
Three-dimensional signed integer range.
using Frustum = Math::Frustum<Float>
Float frustum.
using Nanoseconds = Math::Nanoseconds<Long> new in Git master
64-bit signed integer nanoseconds
using Seconds = Math::Seconds<Float> new in Git master
32-bit float seconds

Half-precision types

These types are for storage and conversion from / to single-precision types, no arithmetic operations are implemented. See Math type system for more information, for performing arithmetic on these types use Math::unpackHalf() / Math::unpackHalfInto() to convert to a 32-bit float type first and then Math::packHalf() / Math::packHalfInto() back again.

using Vector2h = Math::Vector2<Half> new in 2020.06
Two-component half-float vector.
using Vector3h = Math::Vector3<Half> new in 2020.06
Three-component half-float vector.
using Vector4h = Math::Vector4<Half> new in 2020.06
Four-component half-float vector.
using Color3h = Math::Color3<Half> new in 2020.06
Three-component (RGB) half-float color.
using Color4h = Math::Color4<Half> new in 2020.06
Four-component (RGBA) half-float color.
using Matrix2x2h = Math::Matrix2x2<Half> new in 2020.06
Half-float matrix with 2 columns and 2 rows.
using Matrix2x3h = Math::Matrix2x3<Half> new in 2020.06
Half-float matrix with 2 columns and 3 rows.
using Matrix2x4h = Math::Matrix2x4<Half> new in 2020.06
Half-float matrix with 2 columns and 4 rows.
using Matrix3x2h = Math::Matrix3x2<Half> new in 2020.06
Half-float matrix with 3 columns and 2 rows.
using Matrix3x3h = Math::Matrix3x3<Half> new in 2020.06
Half-float matrix with 3 columns and 3 rows.
using Matrix3x4h = Math::Matrix3x4<Half> new in 2020.06
Half-float matrix with 3 columns and 4 rows.
using Matrix4x2h = Math::Matrix4x2<Half> new in 2020.06
Half-float matrix with 4 columns and 2 rows.
using Matrix4x3h = Math::Matrix4x3<Half> new in 2020.06
Half-float matrix with 4 columns and 3 rows.
using Matrix4x4h = Math::Matrix4x4<Half> new in 2020.06
Half-float matrix with 4 columns and 4 rows.
using Degh = Math::Deg<Half> new in Git master
Angle in half-float degrees.
using Radh = Math::Rad<Half> new in Git master
Angle in half-float radians.
using Range1Dh = Math::Range1D<Half> new in Git master
One-dimensional half-float range.
using Range2Dh = Math::Range2D<Half> new in Git master
Two-dimensional half-float range.
using Range3Dh = Math::Range3D<Half> new in Git master
Three-dimensional half-float range.

Double-precision types

See Math type system for more information.

using Double = double
Double (64bit)
using Vector2d = Math::Vector2<Double>
Two-component double vector.
using Vector3d = Math::Vector3<Double>
Three-component double vector.
using Vector4d = Math::Vector4<Double>
Four-component double vector.
using Matrix3d = Math::Matrix3<Double>
3x3 double transformation matrix
using Matrix4d = Math::Matrix4<Double>
4x4 double transformation matrix
using Matrix2x2d = Math::Matrix2x2<Double>
2x2 double matrix
using Matrix3x3d = Math::Matrix3x3<Double>
3x3 double matrix
using Matrix4x4d = Math::Matrix4x4<Double>
4x4 double matrix
using Matrix2x3d = Math::Matrix2x3<Double>
Double matrix with 2 columns and 3 rows.
using Matrix3x2d = Math::Matrix3x2<Double>
Double matrix with 3 columns and 2 rows.
using Matrix2x4d = Math::Matrix2x4<Double>
Double matrix with 2 columns and 4 rows.
using Matrix4x2d = Math::Matrix4x2<Double>
Double matrix with 4 columns and 2 rows.
using Matrix3x4d = Math::Matrix3x4<Double>
Double matrix with 3 columns and 4 rows.
using Matrix4x3d = Math::Matrix4x3<Double>
Double matrix with 4 columns and 3 rows.
using QuadraticBezier2Dd = Math::QuadraticBezier2D<Double>
Double two-dimensional quadratic Bézier curve.
using QuadraticBezier3Dd = Math::QuadraticBezier3D<Double>
Double three-dimensional quadratic Bézier curve.
using CubicBezier2Dd = Math::CubicBezier2D<Double>
Double two-dimensional cubic Bézier curve.
using CubicBezier3Dd = Math::CubicBezier3D<Double>
Double three-dimensional cubic Bézier curve.
using CubicHermite1Dd = Math::CubicHermite1D<Double>
Double scalar cubic Hermite spline point.
using CubicHermite2Dd = Math::CubicHermite2D<Double>
Double two-dimensional cubic Hermite spline point.
using CubicHermite3Dd = Math::CubicHermite3D<Double>
Double three-dimensional cubic Hermite spline point.
using CubicHermiteComplexd = Math::CubicHermiteComplex<Double>
Double cubic Hermite spline complex number.
using CubicHermiteQuaterniond = Math::CubicHermiteQuaternion<Double>
Double cubic Hermite spline quaternion.
using Complexd = Math::Complex<Double>
Double complex number.
using DualComplexd = Math::DualComplex<Double>
Double dual complex number.
using Quaterniond = Math::Quaternion<Double>
Double quaternion.
using DualQuaterniond = Math::DualQuaternion<Double>
Double dual quaternion.
using Constantsd = Math::Constants<Double>
Double constants.
using Degd = Math::Deg<Double>
Angle in double degrees.
using Radd = Math::Rad<Double>
Angle in double radians.
using Range1Dd = Math::Range1D<Double>
One-dimensional double range.
using Range2Dd = Math::Range2D<Double>
Two-dimensional double range.
using Range3Dd = Math::Range3D<Double>
Three-dimensional double range.
using Frustumd = Math::Frustum<Double>
Double frustum.

Enum documentation

enum class Magnum::InputFileCallbackPolicy: UnsignedByte new in 2019.10

Input file callback policy.

Enumerators
LoadTemporary

The requested file is used only during a call of given function and the memory view is not referenced anymore once the function exits.

This can be the case for example when importing image data using Trade::AbstractImporter::image2D() — imported data are copied into the returned Trade::ImageData2D object and the original file is not needed anymore. Note, however, that this might not be the case for all importers — see documentation of a particular plugin for concrete info.

LoadPermanent

The requested file may be used for loading most or all data in the next steps, so the importer expects the memory view to be valid for as long as data import functions are called on it, but at most until the data importer is destroyed, its close() function is called or another file is opened.

This can be the case for example when importing mesh data using Trade::AbstractImporter::mesh() — all vertex data might be combined in a single binary file and each mesh occupies only a portion of it. Note, however, that this might not be the case for all importers — see documentation of a particular plugin for concrete info.

LoadPernament
Close

A file that has been previously loaded by this callback can be closed now (and its memory freed). This is just a hint, it's not required for the callback to close it. This policy is also only ever called with a file that was previously opened with the same callback, so it's possible to completely ignore it and just return the cached value.

This can be the case for example when an importer is done parsing a text file into an internal representation and the original data are no longer needed (and, for example, other files need to be loaded and they could repurpose the unused memory).

enum class Magnum::ImageFlag1D: UnsignedShort new in Git master

1D image layout flag

Used by Image1D, ImageView1D and Trade::ImageData1D. Currently no flags specific to 1D images are defined.

enum class Magnum::ImageFlag2D: UnsignedShort new in Git master

2D image layout flag

Used by Image2D, ImageView2D and Trade::ImageData2D.

Enumerators
Array

The image is a 1D array instead of 2D. I.e., no filtering is done along the Y axis and mip levels don't shorten along the Y axis.

Guaranteed to have the same value as ImageFlag3D::Array.

enum class Magnum::ImageFlag3D: UnsignedShort new in Git master

3D image layout flag

Used by Image3D, ImageView3D and Trade::ImageData3D.

Enumerators
Array

The image is a 2D array instead of 3D. I.e., no filtering is done along the Z axis and mip levels don't shorten along the Z axis.

Guaranteed to have the same value as ImageFlag2D::Array.

CubeMap

The image is a cube map instead of 3D. I.e., there's exactly six square 2D faces in order (+X, -X, +Y, -Y, +Z, -Z), filtering is done on face edges, and mip levels don't shorten along the Z axis. If combined with ImageFlag3D::Array, the image is a cube map array, consisting of an exact multiple of six square 2D faces, with each six layers being one cube map.

enum class Magnum::MeshPrimitive: UnsignedInt

Mesh primitive type.

Can act also as a wrapper for implementation-specific mesh primitive types using meshPrimitiveWrap() and meshPrimitiveUnwrap(). Distinction between generic and implementation-specific primitive types can be done using isMeshPrimitiveImplementationSpecific().

In case of OpenGL, corresponds to GL::MeshPrimitive and is convertible to it using GL::meshPrimitive(). See documentation of each value for more information about the mapping.

In case of Vulkan, corresponds to Vk::MeshPrimitive and is convertible to it using Vk::meshPrimitive(). See documentation of each value for more information about the mapping. Note that not every mode is available there, use Vk::hasMeshPrimitive() to check for its presence.

For D3D, corresponds to D3D_PRIMITIVE_TOPOLOGY; for Metal, corresponds to MTLPrimitiveType. See documentation of each value for more information about the mapping.

Enumerators
Points

Single points.

Corresponds to GL::MeshPrimitive::Points; VK_PRIMITIVE_TOPOLOGY_POINT_LIST; D3D_PRIMITIVE_TOPOLOGY_POINTLIST or MTLPrimitiveTypePoint.

Lines

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

Corresponds to GL::MeshPrimitive::Lines / VK_PRIMITIVE_TOPOLOGY_LINE_LIST; D3D_PRIMITIVE_TOPOLOGY_LINELIST or MTLPrimitiveTypeLine.

LineLoop

Like MeshPrimitive::LineStrip, but with last and first vertex connected together.

Corresponds to GL::MeshPrimitive::LineLoop. Not supported on Vulkan, D3D or Metal.

LineStrip

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

Corresponds to GL::MeshPrimitive::LineStrip / VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; D3D_PRIMITIVE_TOPOLOGY_LINESTRIP or MTLPrimitiveTypeLineStrip.

Triangles

Each three vertices define one triangle.

Corresponds to GL::MeshPrimitive::Triangles / VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST or MTLPrimitiveTypeTriangle.

TriangleStrip

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

Corresponds to GL::MeshPrimitive::TriangleStrip / VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP or D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP or MTLPrimitiveTypeTriangleStrip.

TriangleFan

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

Corresponds to GL::MeshPrimitive::TriangleFan / VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN. Not supported on D3D or Metal.

Instances new in 2020.06

Per-instance data.

Has no direct mapping to GPU APIs, but can be used to annotate Trade::MeshData containing per-instance data (such as colors, transformations or texture layers) and then used to populate an instance buffer. Index buffer has no defined meaning for instance data.

Faces new in 2020.06

Per-face data.

Can be used to annotate Trade::MeshData containing data that are per-face, as opposed to per-vertex. Has no direct mapping to common GPU APIs, there it either has to be converted to per-vertex (which usually involves slightly duplicating the original per-vertex data) or accessed via a direct buffer/texture fetch from a shader using e.g. gl_VertexID. Index buffer can be used to deduplicate per-face data.

Edges new in 2020.06

Per-edge data.

Can be used to annotate Trade::MeshData containing data that are per-edge, as opposed to per-vertex. This is different from MeshPrimitive::Lines as it has just one entry per line segment, instead of two. Has no direct mapping to common GPU APIs, there it has to be converted to per-vertex (which usually involves slightly duplicating the original per-vertex data). Index buffer can be used to deduplicate per-face data. Can also be used for example to describe a half-edge mesh representation.

Meshlets new in Git master

Meshlet data.

Can be used to annotate Trade::MeshData containing meshlet chunks, i.e. groups of vertex references together with per-meshlet culling information such as a bounding sphere or visibility cone.

enum class Magnum::MeshIndexType: UnsignedInt

Mesh index type.

A counterpart to VertexFormat describing a mesh index type. Can act also as a wrapper for implementation-specific mesh index type valueus uing meshIndexTypeWrap() and meshIndexTypeUnwrap(). Distinction between generic and implementation-specific types can be done using isMeshIndexTypeImplementationSpecific().

In case of OpenGL, corresponds to GL::MeshIndexType and is convertible to it using GL::meshIndexType(). See documentation of each value for more information about the mapping.

In case of Vulkan, corresponds to Vk::MeshIndexType and is convertible to it using Vk::meshIndexType(). See documentation of each value for more information about the mapping.

For D3D, corresponds to DXGI_FORMAT; for Metal, corresponds to MTLIndexType. See documentation of each value for more information about the mapping.

Enumerators
UnsignedByte

UnsignedByte.

Corresponds to GL::MeshIndexType::UnsignedByte or Vk::MeshIndexType::UnsignedByte. No D3D or Metal equivalent. Even though OpenGL supports this type and Vulkan can as well via an extension, using this type is discouraged on contemporary GPU architectures. Prefer using 16-bit indices instead.

UnsignedShort

UnsignedShort.

Corresponds to GL::MeshIndexType::UnsignedShort / Vk::MeshIndexType::UnsignedShort; DXGI_FORMAT_R16_UINT or MTLIndexTypeUInt16.

UnsignedInt

UnsignedInt.

Corresponds to GL::MeshIndexType::UnsignedInt / Vk::MeshIndexType::UnsignedInt; DXGI_FORMAT_R32_UINT or MTLIndexTypeUInt32.

enum class Magnum::PixelFormat: UnsignedInt

Format of pixel data.

Can act also as a wrapper for implementation-specific pixel format values using pixelFormatWrap() and pixelFormatUnwrap(). Distinction between generic and implementation-specific formats can be done using isPixelFormatImplementationSpecific().

In case of OpenGL, corresponds to GL::PixelFormat, GL::PixelType and uncompressed GL::TextureFormat values, is convertible to them using GL::pixelFormat(), GL::pixelType() and GL::textureFormat(), and an inverse mapping can be done via GL::genericPixelFormat(PixelFormat, PixelType) and GL::genericPixelFormat(TextureFormat). See documentation of each value for more information about the mapping. Note that not every format is available on all targets, use GL::hasPixelFormat() to check for its presence.

In case of Vulkan, corresponds to uncompressed Vk::PixelFormat values, is convertible to it using Vk::pixelFormat(Magnum::PixelFormat), and an inverse mapping can be done via Vk::genericPixelFormat(). See documentation of each value for more information about the mapping. Note that not every format may be available, use Vk::hasPixelFormat(Magnum::PixelFormat) to check for its presence.

For D3D, corresponds to DXGI_FORMAT and import is provided by the DdsImporter plugin; for Metal, corresponds to MTLPixelFormat. See documentation of each value for more information about the mapping.

See also pixelFormatSize(), pixelFormatChannelFormat(), pixelFormatChannelCount(), isPixelFormatNormalized(), isPixelFormatIntegral(), isPixelFormatFloatingPoint(), isPixelFormatSrgb(), isPixelFormatDepthOrStencil() and pixelFormat() for querying various aspects of a format and assembling it from a set of singular properties.

Enumerators
R8Unorm

Red component, normalized unsigned byte.

Corresponds to GL::PixelFormat::Red and GL::PixelType::UnsignedByte, GL::TextureFormat::R8 or alternatively GL::PixelFormat::Luminance and GL::TextureFormat::Luminance on unextended OpenGL 2.1 and OpenGL ES 2.0; Vk::PixelFormat::R8Unorm; DXGI_FORMAT_R8_UNORM or MTLPixelFormatR8Unorm.

RG8Unorm

Red and green component, normalized unsigned byte.

Corresponds to GL::PixelFormat::RG and GL::PixelType::UnsignedByte, GL::TextureFormat::RG8 or alternatively GL::PixelFormat::LuminanceAlpha and GL::TextureFormat::LuminanceAlpha on unextended OpenGL 2.1 and OpenGL ES 2.0; Vk::PixelFormat::RG8Unorm; DXGI_FORMAT_R8G8_UNORM or MTLPixelFormatRG8Unorm.

RGB8Unorm

RGB, normalized unsigned byte.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::UnsignedByte, GL::TextureFormat::RGB8 or alternatively GL::TextureFormat::RGB on unextended OpenGL 2.1 and OpenGL ES 2.0; Vk::PixelFormat::RGB8Unorm. No 24-bit D3D or Metal equivalent.

RGBA8Unorm

RGBA, normalized unsigned byte.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::UnsignedByte, GL::TextureFormat::RGBA8 or alternatively GL::TextureFormat::RGBA on unextended OpenGL 2.1 and OpenGL ES 2.0; Vk::PixelFormat::RGBA8Unorm; DXGI_FORMAT_R8G8B8A8_UNORM or MTLPixelFormatRGBA8Unorm.

R8Snorm

Red component, normalized signed byte.

Corresponds to GL::PixelFormat::Red and GL::PixelType::Byte, GL::TextureFormat::R8Snorm; Vk::PixelFormat::R8Snorm; DXGI_FORMAT_R8_SNORM or MTLPixelFormatR8Snorm.

RG8Snorm

Red and green component, normalized signed byte.

Corresponds to GL::PixelFormat::RG and GL::PixelType::Byte, GL::TextureFormat::RG8Snorm; Vk::PixelFormat::RG8Snorm; DXGI_FORMAT_R8G8_SNORM or MTLPixelFormatRG8Snorm.

RGB8Snorm

RGB, normalized signed byte.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::Byte, GL::TextureFormat::RGB8Snorm; Vk::PixelFormat::RGB8Snorm. No 24-bit D3D or Metal equivalent.

RGBA8Snorm

RGBA, normalized signed byte.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::Byte, GL::TextureFormat::RGBA8Snorm; Vk::PixelFormat::RGBA8Snorm; DXGI_FORMAT_R8G8B8A8_SNORM or MTLPixelFormatRGBA8Snorm.

R8Srgb new in 2019.10

sRGB-encoded red component, normalized unsigned byte.

Corresponds to GL::PixelFormat::Red and GL::PixelType::UnsignedByte, GL::TextureFormat::SR8; Vk::PixelFormat::R8Srgb or MTLPixelFormatR8Unorm_sRGB. No D3D equivalent.

RG8Srgb new in 2019.10

sRGB-encoded red and green component, normalized unsigned byte.

Corresponds to GL::PixelFormat::RG and GL::PixelType::UnsignedByte, GL::TextureFormat::SRG8; Vk::PixelFormat::RG8Srgb or MTLPixelFormatRG8Unorm_sRGB. No D3D equivalent.

RGB8Srgb new in 2019.10

sRGB, normalized unsigned byte.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::UnsignedByte, GL::TextureFormat::SRGB8 or Vk::PixelFormat::RGB8Srgb. No 24-bit D3D or Metal equivalent.

RGBA8Srgb new in 2019.10

sRGB + linear alpha, normalized unsigned byte.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::UnsignedByte, GL::TextureFormat::SRGB8Alpha8; Vk::PixelFormat::RGBA8Srgb; DXGI_FORMAT_R8G8B8A8_UNORM_SRGB or MTLPixelFormatRGBA8Unorm_sRGB.

R8UI

Red component, integral unsigned byte.

Corresponds to GL::PixelFormat::RedInteger and GL::PixelType::UnsignedByte, GL::TextureFormat::R8UI; Vk::PixelFormat::R8UI; DXGI_FORMAT_R8_UINT or MTLPixelFormatR8Uint.

RG8UI

Red and green component, integral unsigned byte.

Corresponds to GL::PixelFormat::RGInteger and GL::PixelType::UnsignedByte, GL::TextureFormat::RG8UI; Vk::PixelFormat::RG8UI; DXGI_FORMAT_R8G8_UINT or MTLPixelFormatRG8Uint.

RGB8UI

RGB, integral unsigned byte.

Corresponds to GL::PixelFormat::RGBInteger and GL::PixelType::UnsignedByte, GL::TextureFormat::RGB8UI or Vk::PixelFormat::RGB8UI. No 24-bit D3D or Metal equivalent.

RGBA8UI

RGBA, integral unsigned byte.

Corresponds to GL::PixelFormat::RGBAInteger and GL::PixelType::UnsignedByte, GL::TextureFormat::RGBA8UI; Vk::PixelFormat::RGBA8UI; DXGI_FORMAT_R8G8B8A8_UINT or MTLPixelFormatRGBA8Uint.

R8I

Red component, integral signed byte.

Corresponds to GL::PixelFormat::RedInteger and GL::PixelType::Byte, GL::TextureFormat::R8I; Vk::PixelFormat::R8I; DXGI_FORMAT_R8_SINT or MTLPixelFormatR8Sint.

RG8I

Red and green component, integral signed byte.

Corresponds to GL::PixelFormat::RGInteger and GL::PixelType::Byte, GL::TextureFormat::RG8I; Vk::PixelFormat::RG8I; DXGI_FORMAT_R8G8_SINT or MTLPixelFormatRG8Sint.

RGB8I

RGB, integral signed byte.

Corresponds to GL::PixelFormat::RGBInteger and GL::PixelType::Byte, GL::TextureFormat::RGB8I; Vk::PixelFormat::RGB8I. No 24-bit D3D or Metal equivalent.

RGBA8I

RGBA, integral signed byte.

Corresponds to GL::PixelFormat::RGBAInteger and GL::PixelType::Byte, GL::TextureFormat::RGBA8I; Vk::PixelFormat::RGBA8I; DXGI_FORMAT_R8G8B8A8_SINT or MTLPixelFormatRGBA8Sint.

R16Unorm

Red component, normalized unsigned short.

Corresponds to GL::PixelFormat::Red and GL::PixelType::UnsignedShort, GL::TextureFormat::R16; Vk::PixelFormat::R16Unorm; DXGI_FORMAT_R16_UNORM or MTLPixelFormatR16Unorm.

RG16Unorm

Red and green component, normalized unsigned short.

Corresponds to GL::PixelFormat::RG and GL::PixelType::UnsignedShort, GL::TextureFormat::RG16; Vk::PixelFormat::RG16Unorm; DXGI_FORMAT_R16G16_UNORM or MTLPixelFormatRG16Unorm.

RGB16Unorm

RGB, normalized unsigned short.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::UnsignedShort, GL::TextureFormat::RGB16 or Vk::PixelFormat::RGB16Unorm. No 48-bit D3D or Metal equivalent.

RGBA16Unorm

RGBA, normalized unsigned short.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::UnsignedShort, GL::TextureFormat::RGBA16; Vk::PixelFormat::RGBA16Unorm; DXGI_FORMAT_R16G16B16A16_UNORM or MTLPixelFormatRGBA16Unorm.

R16Snorm

Red component, normalized signed short.

Corresponds to GL::PixelFormat::Red and GL::PixelType::Short, GL::TextureFormat::R16Snorm; Vk::PixelFormat::R16Snorm; DXGI_FORMAT_R16_SNORM or MTLPixelFormatR16Snorm.

RG16Snorm

Red and green component, normalized signed short.

Corresponds to GL::PixelFormat::RG and GL::PixelType::Short, GL::TextureFormat::RG16Snorm; Vk::PixelFormat::RG16Snorm; DXGI_FORMAT_R16G16_SNORM or MTLPixelFormatRG16Snorm.

RGB16Snorm

RGB, normalized signed short.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::Short, GL::TextureFormat::RGB16Snorm; Vk::PixelFormat::RGB16Snorm. No 48-bit D3D or Metal equivalent.

RGBA16Snorm

RGBA, normalized signed short.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::Short, GL::TextureFormat::RGBA16Snorm; Vk::PixelFormat::RGBA16Snorm; DXGI_FORMAT_R16G16B16A16_SNORM or MTLPixelFormatRGBA16Snorm.

R16UI

Red component, integral unsigned short.

Corresponds to GL::PixelFormat::RedInteger and GL::PixelType::UnsignedShort, GL::TextureFormat::R16UI; Vk::PixelFormat::R16UI; DXGI_FORMAT_R16_UINT or MTLPixelFormatR16Uint.

RG16UI

Red and green component, integral unsigned short.

Corresponds to GL::PixelFormat::RGInteger and GL::PixelType::UnsignedShort, GL::TextureFormat::RG16UI; Vk::PixelFormat::RG16UI; DXGI_FORMAT_R16G16_UINT or MTLPixelFormatRG16Uint.

RGB16UI

RGB, integral unsigned short.

Corresponds to GL::PixelFormat::RGBInteger and GL::PixelType::UnsignedShort, GL::TextureFormat::RGB16UI; Vk::PixelFormat::RGB16UI. No 48-bit D3D or Metal equivalent.

RGBA16UI

RGBA, integral unsigned short.

Corresponds to GL::PixelFormat::RGBAInteger and GL::PixelType::UnsignedShort, GL::TextureFormat::RGBA16UI; Vk::PixelFormat::RGBA16UI; DXGI_FORMAT_R16G16B16A16_UINT or MTLPixelFormatRGBA16Uint.

R16I

Red component, integral signed short.

Corresponds to GL::PixelFormat::RedInteger and GL::PixelType::Short, GL::TextureFormat::R16I; Vk::PixelFormat::R16I; DXGI_FORMAT_R16_SINT or MTLPixelFormatR16Sint.

RG16I

Red and green component, integral signed short.

Corresponds to GL::PixelFormat::RGInteger and GL::PixelType::Short, GL::TextureFormat::RG16I; Vk::PixelFormat::RG16I; DXGI_FORMAT_R16G16_SINT or MTLPixelFormatRG16Sint.

RGB16I

RGB, integral signed short.

Corresponds to GL::PixelFormat::RGBInteger and GL::PixelType::Short, GL::TextureFormat::RGB16I; Vk::PixelFormat::RGB16I. No 48-bit D3D or Metal equivalent.

RGBA16I

RGBA, integral signed short.

Corresponds to GL::PixelFormat::RGBAInteger and GL::PixelType::Short, GL::TextureFormat::RGBA16I; Vk::PixelFormat::RGBA16I; DXGI_FORMAT_R16G16B16A16_SINT or MTLPixelFormatRGBA16Sint.

R32UI

Red component, integral unsigned int.

Corresponds to GL::PixelFormat::RedInteger and GL::PixelType::UnsignedInt, GL::TextureFormat::R32UI; Vk::PixelFormat::R32UI; DXGI_FORMAT_R32_UINT or MTLPixelFormatR32Uint.

RG32UI

Red and green component, integral unsigned int.

Corresponds to GL::PixelFormat::RGInteger and GL::PixelType::UnsignedInt, GL::TextureFormat::RG32UI; Vk::PixelFormat::RG32UI; DXGI_FORMAT_R32G32_UINT or MTLPixelFormatRG32Uint.

RGB32UI

RGB, integral unsigned int.

Corresponds to GL::PixelFormat::RGBInteger and GL::PixelType::UnsignedInt, GL::TextureFormat::RGB32UI; Vk::PixelFormat::RGB32UI or DXGI_FORMAT_R32G32B32_UINT. No 96-bit Metal equivalent.

RGBA32UI

RGBA, integral unsigned int.

Corresponds to GL::PixelFormat::RGBAInteger and GL::PixelType::UnsignedInt, GL::TextureFormat::RGBA32UI; Vk::PixelFormat::RGBA32UI; DXGI_FORMAT_R32G32B32A32_UINT or MTLPixelFormatRGBA32Uint.

R32I

Red component, integral signed int.

Corresponds to GL::PixelFormat::RedInteger and GL::PixelType::Int, GL::TextureFormat::R32I; Vk::PixelFormat::R32I; DXGI_FORMAT_R32_SINT or MTLPixelFormatR32Sint.

RG32I

Red and green component, integral signed int.

Corresponds to GL::PixelFormat::RGInteger and GL::PixelType::Int, GL::TextureFormat::RG32I; Vk::PixelFormat::RG32I; DXGI_FORMAT_R32G32_SINT or MTLPixelFormatRG32Sint.

RGB32I

RGB, integral signed int.

Corresponds to GL::PixelFormat::RGBInteger and GL::PixelType::Int, GL::TextureFormat::RGB32I; Vk::PixelFormat::RGB32I or DXGI_FORMAT_R32G32B32_SINT. No 96-bit Metal equivalent.

RGBA32I

RGBA, integral signed int.

Corresponds to GL::PixelFormat::RGBAInteger and GL::PixelType::Int, GL::TextureFormat::RGBA32I; Vk::PixelFormat::RGBA32I; DXGI_FORMAT_R32G32B32A32_SINT or MTLPixelFormatRGBA32Sint.

R16F

Red component, half float.

Corresponds to GL::PixelFormat::Red and GL::PixelType::Half, GL::TextureFormat::R16F; Vk::PixelFormat::R16F; DXGI_FORMAT_R16_FLOAT or MTLPixelFormatR16Float.

RG16F

Red and green component, half float.

Corresponds to GL::PixelFormat::RG and GL::PixelType::Half, GL::TextureFormat::RG16F; Vk::PixelFormat::RG16F; DXGI_FORMAT_R16G16_FLOAT or MTLPixelFormatRG16Float.

RGB16F

RGB, half float.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::Half, GL::TextureFormat::RGB16F; Vk::PixelFormat::RGB16F. No 48-bit D3D or Metal equivalent.

RGBA16F

RGBA, half float.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::Half, GL::TextureFormat::RGBA16F; Vk::PixelFormat::RGBA16F; DXGI_FORMAT_R16G16B16A16_FLOAT or MTLPixelFormatRGBA16Float.

R32F

Red component, float.

Corresponds to GL::PixelFormat::Red and GL::PixelType::Float, GL::TextureFormat::R32F; Vk::PixelFormat::R32F; DXGI_FORMAT_R32_FLOAT or MTLPixelFormatR32Float.

RG32F

Red and green component, float.

Corresponds to GL::PixelFormat::RG and GL::PixelType::Float, GL::TextureFormat::RG32F; Vk::PixelFormat::RG32F; DXGI_FORMAT_R32G32_FLOAT or MTLPixelFormatRG32Float.

RGB32F

RGB, float.

Corresponds to GL::PixelFormat::RGB and GL::PixelType::Float, GL::TextureFormat::RGB32F; Vk::PixelFormat::RGB32F or DXGI_FORMAT_R32G32B32_FLOAT. No 96-bit Metal equivalent.

RGBA32F

RGBA, float.

Corresponds to GL::PixelFormat::RGBA and GL::PixelType::Float, GL::TextureFormat::RGBA32F; Vk::PixelFormat::RGBA32F; DXGI_FORMAT_R32G32B32A32_FLOAT or MTLPixelFormatRGBA32Float.

Depth16Unorm new in Git master

16-bit unsigned normalized depth.

Corresponds to GL::PixelFormat::DepthComponent and GL::PixelType::UnsignedShort, GL::TextureFormat::DepthComponent16; Vk::PixelFormat::Depth16Unorm; DXGI_FORMAT_D16_UNORM or MTLPixelFormatDepth16Unorm.

Depth24Unorm new in Git master

24-bit unsigned normalized depth. Data layout consistent with the KTX2 specification — aligned to 32 bits with the 8 most significant bits unused.

Corresponds to GL::PixelFormat::DepthComponent and GL::PixelType::UnsignedInt, GL::TextureFormat::DepthComponent24; Vk::PixelFormat::Depth24Unorm. No direct 24-bit D3D or Metal equivalent.

Depth32F new in Git master

32-bit float depth.

Corresponds to GL::PixelFormat::DepthComponent and GL::PixelType::Float, GL::TextureFormat::DepthComponent32F; Vk::PixelFormat::Depth32F; DXGI_FORMAT_D32_FLOAT or MTLPixelFormatDepth32Float.

Stencil8UI new in Git master

8-bit unsigned integral stencil.

Corresponds to GL::PixelFormat::StencilIndex and GL::PixelType::UnsignedByte, GL::TextureFormat::StencilIndex8; Vk::PixelFormat::Stencil8UI or MTLPixelFormatStencil8. No direct 8-bit D3D equivalent.

Depth16UnormStencil8UI new in Git master

16-bit unsigned normalized depth with 8-bit unsigned integral stencil. Data layout consistent with the KTX2 specification — aligned to 32 bits with depth in the 16 least significant bits and the 8 most significant bits unused.

Corresponds to Vk::PixelFormat::Depth16UnormStencil8UI. No direct 32-bit GL, D3D or Metal equivalent.

Depth24UnormStencil8UI new in Git master

24-bit unsigned normalized depth with 8-bit unsigned integral stencil. Data layout consistent with the KTX2 specification — packed to 32 bits with depth in the 24 least significant bits and stencil being in the 8 most significant bits.

Corresponds to GL::PixelFormat::DepthStencil and GL::PixelType::UnsignedInt248, GL::TextureFormat::Depth24Stencil8; Vk::PixelFormat::Depth24UnormStencil8UI; DXGI_FORMAT_D24_UNORM_S8_UINT or MTLPixelFormatDepth24Unorm_Stencil8.

Depth32FStencil8UI new in Git master

32-bit float depth with 8-bit unsigned integral stencil. Data layout consistent with the KTX2 specification — packed to 64 bits with the depth in the 32 least significant bits and the 24 most significant bits unused.

Corresponds to GL::PixelFormat::DepthStencil and GL::PixelType::Float32UnsignedInt248Rev, GL::TextureFormat::Depth32FStencil8; Vk::PixelFormat::Depth32FStencil8UI; DXGI_FORMAT_D32_FLOAT_S8X24_UINT or MTLPixelFormatDepth32Float_Stencil8.

enum class Magnum::CompressedPixelFormat: UnsignedInt

Format of compressed pixel data.

Can act also as a wrapper for implementation-specific pixel format values using compressedPixelFormatWrap() and compressedPixelFormatUnwrap(). Distinction between generic and implementation-specific formats can be done using isCompressedPixelFormatImplementationSpecific().

In case of OpenGL, corresponds to GL::CompressedPixelFormat and compressed GL::TextureFormat values, is convertible to them using GL::compressedPixelFormat() and GL::textureFormat(), and an inverse mapping can be done via GL::genericCompressedPixelFormat(CompressedPixelFormat) and GL::genericCompressedPixelFormat(TextureFormat). See documentation of each value for more information about the mapping. Note that not every format is available on all targets, use GL::hasCompressedPixelFormat() to check for its presence.

In case of Vulkan, corresponds to compressed Vk::PixelFormat values, is convertible to it using Vk::pixelFormat(Magnum::CompressedPixelFormat), and an inverse mapping can be done via Vk::genericCompressedPixelFormat(). See documentation of each value for more information about the mapping. Note that not every format may be available, use Vk::hasPixelFormat(Magnum::CompressedPixelFormat) to check for its presence.

For D3D, corresponds to DXGI_FORMAT and import is provided by the DdsImporter plugin; for Metal, corresponds to MTLPixelFormat. See documentation of each value for more information about the mapping.

Enumerators
Bc1RGBUnorm

S3TC BC1 compressed RGB, normalized unsigned (DXT1). 64bit 4x4 blocks with a 1-bit alpha component that's ignored.

Corresponds to GL::CompressedPixelFormat::RGBS3tcDxt1, GL::TextureFormat::CompressedRGBS3tcDxt1 or Vk::PixelFormat::CompressedBc1RGBUnorm. No D3D or Metal equivalent.

Bc1RGBSrgb new in 2019.10

S3TC BC1 compressed sRGB, normalized unsigned (DXT1). 64bit 4x4 blocks with a 1-bit alpha component that's ignored.

Corresponds to GL::CompressedPixelFormat::SRGBS3tcDxt1, GL::TextureFormat::CompressedSRGBS3tcDxt1 or Vk::PixelFormat::CompressedBc1RGBSrgb. No D3D or Metal equivalent.

Bc1RGBAUnorm

S3TC BC1 compressed RGBA, normalized unsigned (DXT1). 64bit 4x4 blocks with a 1-bit alpha component.

Corresponds to GL::CompressedPixelFormat::RGBAS3tcDxt1, GL::TextureFormat::CompressedRGBAS3tcDxt1; Vk::PixelFormat::CompressedBc1RGBAUnorm; DXGI_FORMAT_BC1_UNORM or MTLPixelFormatBC1_RGBA.

Bc1RGBASrgb new in 2019.10

S3TC BC1 compressed sRGB + linear alpha, normalized unsigned (DXT1). 64bit 4x4 blocks with a 1-bit alpha component.

Corresponds to GL::CompressedPixelFormat::SRGBAlphaS3tcDxt1, GL::TextureFormat::CompressedSRGBAlphaS3tcDxt1; Vk::PixelFormat::CompressedBc1RGBASrgb; DXGI_FORMAT_BC1_UNORM_SRGB or MTLPixelFormatBC1_RGBA_sRGB.

Bc2RGBAUnorm

S3TC BC2 compressed RGBA, normalized unsigned (DXT3). A 128-bit 4x4 block, consisting of a 64-bit explicit alpha block followed by a 64-bit color block encoded the same way as BC1.

Corresponds to GL::CompressedPixelFormat::RGBAS3tcDxt3, GL::TextureFormat::CompressedRGBAS3tcDxt3; Vk::PixelFormat::CompressedBc2RGBAUnorm; DXGI_FORMAT_BC2_UNORM or MTLPixelFormatBC2_RGBA.

Bc2RGBASrgb new in 2019.10

S3TC BC2 compressed sRGB + linear alpha, normalized unsigned (DXT3). A 128-bit 4x4 block, consisting of a 64-bit explicit alpha block followed by a 64-bit color block encoded the same way as BC1.

Corresponds to GL::CompressedPixelFormat::SRGBAlphaS3tcDxt3, GL::TextureFormat::CompressedSRGBAlphaS3tcDxt3; Vk::PixelFormat::CompressedBc2RGBASrgb; DXGI_FORMAT_BC2_UNORM_SRGB or MTLPixelFormatBC2_RGBA_sRGB.

Bc3RGBAUnorm

S3TC BC3 compressed RGBA, normalized unsigned (DXT5). A 128-bit 4x4 block, consisting of a 64-bit interpolated alpha block followed by a 64-bit color block encoded the same way as BC1.

Corresponds to GL::CompressedPixelFormat::RGBAS3tcDxt5, GL::TextureFormat::CompressedRGBAS3tcDxt5; Vk::PixelFormat::CompressedBc3RGBAUnorm; DXGI_FORMAT_BC3_UNORM or MTLPixelFormatBC3_RGBA.

Bc3RGBASrgb new in 2019.10

S3TC BC3 compressed sRGB + linear alpha, normalized unsigned (DXT5). A 128-bit 4x4 block, consisting of a 64-bit interpolated alpha block followed by a 64-bit color block encoded the same way as BC1.

Corresponds to GL::CompressedPixelFormat::SRGBAlphaS3tcDxt5, GL::TextureFormat::CompressedSRGBAlphaS3tcDxt5; Vk::PixelFormat::CompressedBc3RGBASrgb; DXGI_FORMAT_BC3_UNORM_SRGB or MTLPixelFormatBC3_RGBA_sRGB.

Bc4RUnorm new in 2019.10

3Dc+ BC4 compressed red component, unsigned normalized. Also known as RGTC1 or LATC1. A 64-bit 4x4 block encoded the same way as the alpha block of BC3.

Corresponds to GL::CompressedPixelFormat::RedRgtc1, GL::TextureFormat::CompressedRedRgtc1; Vk::PixelFormat::CompressedBc4RUnorm; DXGI_FORMAT_BC4_UNORM or MTLPixelFormatBC4_RUnorm.

Bc4RSnorm new in 2019.10

3Dc+ BC4 compressed red component, signed normalized. Also known as RGTC1 or LATC1. A 64-bit 4x4 block encoded the same way as the alpha block of BC3.

Corresponds to GL::CompressedPixelFormat::SignedRedRgtc1, GL::TextureFormat::CompressedSignedRedRgtc1; Vk::PixelFormat::CompressedBc4RSnorm; DXGI_FORMAT_BC4_SNORM or MTLPixelFormatBC4_RSnorm.

Bc5RGUnorm new in 2019.10

3Dc BC5 compressed red and green component, unsigned normalized. Also known as RGTC2 or LATC2. A 128-bit 4x4 block consisting of two 64bit blocks for each channel encoded the same way as the alpha block of BC3.

Corresponds to GL::CompressedPixelFormat::RGRgtc2, GL::TextureFormat::CompressedRGRgtc2; Vk::PixelFormat::CompressedBc5RGUnorm; DXGI_FORMAT_BC5_UNORM or MTLPixelFormatBC5_RGUnorm.

Bc5RGSnorm new in 2019.10

3Dc BC5 compressed red and green component, signed normalized. Also known as RGTC2 or LATC2. A 128-bit 4x4 block consisting of two 64bit blocks for each channel encoded the same way as the alpha block of BC3.

Corresponds to GL::CompressedPixelFormat::SignedRGRgtc2, GL::TextureFormat::CompressedSignedRGRgtc2; Vk::PixelFormat::CompressedBc5RGSnorm; DXGI_FORMAT_BC5_SNORM or MTLPixelFormatBC5_RGSnorm.

Bc6hRGBUfloat new in 2019.10

BC6H compressed RGB, unsigned float. Also known as BPTC.

Corresponds to GL::CompressedPixelFormat::RGBBptcUnsignedFloat, GL::TextureFormat::CompressedRGBBptcUnsignedFloat; Vk::PixelFormat::CompressedBc6hRGBUfloat; DXGI_FORMAT_BC6H_UF16 or MTLPixelFormatBC6H_RGBUfloat.

Bc6hRGBSfloat new in 2019.10

BC6H compressed RGB, signed float. Also known as BPTC.

Corresponds to GL::CompressedPixelFormat::RGBBptcSignedFloat, GL::TextureFormat::CompressedRGBBptcSignedFloat; Vk::PixelFormat::CompressedBc6hRGBSfloat; DXGI_FORMAT_BC6H_SF16 or MTLPixelFormatBC6H_RGBFloat.

Bc7RGBAUnorm new in 2019.10

BC7, compressed RGBA, unsigned normalized. Also known as BPTC.

Corresponds to GL::CompressedPixelFormat::RGBABptcUnorm, GL::TextureFormat::CompressedRGBABptcUnorm; Vk::PixelFormat::CompressedBc7RGBAUnorm; DXGI_FORMAT_BC7_UNORM or MTLPixelFormatBC7_RGBAUnorm.

Bc7RGBASrgb new in 2019.10

BC7, compressed sRGB + linear alpha, unsigned normalized. Also known as BPTC.

Corresponds to GL::CompressedPixelFormat::SRGBAlphaBptcUnorm, GL::TextureFormat::CompressedSRGBAlphaBptcUnorm; Vk::PixelFormat::CompressedBc7RGBASrgb; DXGI_FORMAT_BC7_UNORM_SRGB or MTLPixelFormatBC7_RGBAUnorm_sRGB.

EacR11Unorm new in 2019.10

EAC compressed red component, normalized unsigned 11-bit.

Corresponds to GL::CompressedPixelFormat::R11Eac, GL::TextureFormat::CompressedR11Eac; Vk::PixelFormat::CompressedEacR11Unorm or MTLPixelFormatEAC_R11Unorm. No equivalent in D3D.

EacR11Snorm new in 2019.10

EAC compressed red component, normalized signed 11-bit.

Corresponds to GL::CompressedPixelFormat::SignedR11Eac, GL::TextureFormat::CompressedSignedR11Eac; Vk::PixelFormat::CompressedEacR11Snorm or MTLPixelFormatEAC_R11Snorm. No equivalent in D3D.

EacRG11Unorm new in 2019.10

EAC compressed red and green component, normalized unsigned 11-bit.

Corresponds to GL::CompressedPixelFormat::RG11Eac, GL::TextureFormat::CompressedRG11Eac; Vk::PixelFormat::CompressedEacRG11Unorm or MTLPixelFormatEAC_RG11Unorm. No equivalent in D3D.

EacRG11Snorm new in 2019.10

EAC compressed red and green component, normalized signed 11-bit.

Corresponds to GL::CompressedPixelFormat::SignedRG11Eac, GL::TextureFormat::CompressedSignedRG11Eac; Vk::PixelFormat::CompressedEacRG11Snorm or MTLPixelFormatEAC_RG11Snorm. No equivalent in D3D.

Etc2RGB8Unorm new in 2019.10

ETC2 compressed RGB, normalized unsigned byte.

Corresponds to GL::CompressedPixelFormat::RGB8Etc2, GL::TextureFormat::CompressedRGB8Etc2; Vk::PixelFormat::CompressedEtc2RGB8Unorm or MTLPixelFormatETC2_RGB8. No equivalent in D3D.

Etc2RGB8Srgb new in 2019.10

ETC2 compressed sRGB, normalized unsigned byte.

Corresponds to GL::CompressedPixelFormat::SRGB8Etc2, GL::TextureFormat::CompressedSRGB8Etc2; Vk::PixelFormat::CompressedEtc2RGB8Srgb or MTLPixelFormatETC2_RGB8_sRGB. No equivalent in D3D.

Etc2RGB8A1Unorm new in 2019.10

ETC2 compressed RGB, normalized unsigned byte + a single-bit alpha.

Corresponds to GL::CompressedPixelFormat::RGB8PunchthroughAlpha1Etc2, GL::TextureFormat::CompressedRGB8PunchthroughAlpha1Etc2; Vk::PixelFormat::CompressedEtc2RGB8A1Unorm or MTLPixelFormatETC2_RGB8A1. No equivalent in D3D.

Etc2RGB8A1Srgb new in 2019.10

ETC2 compressed sRGB, normalized unsigned byte + a single-bit alpha.

Corresponds to GL::CompressedPixelFormat::SRGB8PunchthroughAlpha1Etc2, GL::TextureFormat::CompressedSRGB8PunchthroughAlpha1Etc2; Vk::PixelFormat::CompressedEtc2RGB8A1Srgb or MTLPixelFormatETC2_RGB8A1_sRGB. No equivalent in D3D.

Etc2RGBA8Unorm new in 2019.10

ETC2 compressed RGBA, normalized unsigned byte (EAC).

Corresponds to GL::CompressedPixelFormat::RGBA8Etc2Eac, GL::TextureFormat::CompressedRGBA8Etc2Eac; Vk::PixelFormat::CompressedEtc2RGBA8Unorm or MTLPixelFormatEAC_RGBA8. No equivalent in D3D.

Etc2RGBA8Srgb new in 2019.10

ETC2 compressed sRGB + linear alpha, normalized unsigned byte (EAC).

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Etc2Eac, GL::TextureFormat::CompressedSRGB8Alpha8Etc2Eac; Vk::PixelFormat::CompressedEtc2RGBA8Srgb or MTLPixelFormatEAC_RGBA8_sRGB. No equivalent in D3D.

Astc4x4RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 4x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x4, GL::TextureFormat::CompressedRGBAAstc4x4; Vk::PixelFormat::CompressedAstc4x4RGBAUnorm or MTLPixelFormatASTC_4x4_LDR. No equivalent in D3D.

Astc4x4RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 4x4 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc4x4, GL::TextureFormat::CompressedSRGB8Alpha8Astc4x4; Vk::PixelFormat::CompressedAstc4x4RGBASrgb or MTLPixelFormatASTC_4x4_sRGB. No equivalent in D3D.

Astc4x4RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 4x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x4, GL::TextureFormat::CompressedRGBAAstc4x4; Vk::PixelFormat::CompressedAstc4x4RGBAF or MTLPixelFormatASTC_4x4_HDR. No equivalent in D3D.

Astc5x4RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 5x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x4, GL::TextureFormat::CompressedRGBAAstc5x4; Vk::PixelFormat::CompressedAstc5x4RGBAUnorm or MTLPixelFormatASTC_5x4_LDR. No equivalent in D3D.

Astc5x4RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 5x4 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc5x4, GL::TextureFormat::CompressedSRGB8Alpha8Astc5x4; Vk::PixelFormat::CompressedAstc5x4RGBASrgb or MTLPixelFormatASTC_5x4_sRGB. No equivalent in D3D.

Astc5x4RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 5x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x4, GL::TextureFormat::CompressedRGBAAstc5x4; Vk::PixelFormat::CompressedAstc5x4RGBAF or MTLPixelFormatASTC_5x4_HDR. No equivalent in D3D.

Astc5x5RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 5x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x5, GL::TextureFormat::CompressedRGBAAstc5x5; Vk::PixelFormat::CompressedAstc5x5RGBAUnorm or MTLPixelFormatASTC_5x5_LDR. No equivalent in D3D.

Astc5x5RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 5x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc5x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc5x5; Vk::PixelFormat::CompressedAstc5x5RGBASrgb or MTLPixelFormatASTC_5x5_sRGB. No equivalent in D3D.

Astc5x5RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 5x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x5, GL::TextureFormat::CompressedRGBAAstc5x5; Vk::PixelFormat::CompressedAstc5x5RGBAF or MTLPixelFormatASTC_5x5_HDR. No equivalent in D3D.

Astc6x5RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 6x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x5, GL::TextureFormat::CompressedRGBAAstc6x5; Vk::PixelFormat::CompressedAstc6x5RGBAUnorm or MTLPixelFormatASTC_6x5_LDR. No equivalent in D3D.

Astc6x5RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 6x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc6x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc6x5; Vk::PixelFormat::CompressedAstc6x5RGBASrgb or MTLPixelFormatASTC_6x5_sRGB. No equivalent in D3D.

Astc6x5RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 6x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x5, GL::TextureFormat::CompressedRGBAAstc6x5; Vk::PixelFormat::CompressedAstc6x5RGBAF or MTLPixelFormatASTC_6x5_HDR. No equivalent in D3D.

Astc6x6RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 6x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x6, GL::TextureFormat::CompressedRGBAAstc6x6; Vk::PixelFormat::CompressedAstc6x6RGBAUnorm or MTLPixelFormatASTC_6x6_LDR. No equivalent in D3D.

Astc6x6RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 6x6 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc6x6, GL::TextureFormat::CompressedSRGB8Alpha8Astc6x6; Vk::PixelFormat::CompressedAstc6x6RGBASrgb or MTLPixelFormatASTC_6x6_sRGB. No equivalent in D3D.

Astc6x6RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 6x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x6, GL::TextureFormat::CompressedRGBAAstc6x6; Vk::PixelFormat::CompressedAstc6x6RGBAF or MTLPixelFormatASTC_6x6_HDR. No equivalent in D3D.

Astc8x5RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 8x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc8x5, GL::TextureFormat::CompressedRGBAAstc8x5; Vk::PixelFormat::CompressedAstc8x5RGBAUnorm or MTLPixelFormatASTC_8x5_LDR. No equivalent in D3D.

Astc8x5RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 8x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc8x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc8x5; Vk::PixelFormat::CompressedAstc8x5RGBASrgb or MTLPixelFormatASTC_8x5_sRGB. No equivalent in D3D.

Astc8x5RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 8x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc8x5, GL::TextureFormat::CompressedRGBAAstc8x5; Vk::PixelFormat::CompressedAstc8x5RGBAF or MTLPixelFormatASTC_8x5_HDR. No equivalent in D3D.

Astc8x6RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 8x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc8x6, GL::TextureFormat::CompressedRGBAAstc8x6; Vk::PixelFormat::CompressedAstc8x6RGBAUnorm or MTLPixelFormatASTC_8x6_LDR. No equivalent in D3D.

Astc8x6RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 8x6 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc8x6, GL::TextureFormat::CompressedSRGB8Alpha8Astc8x6; Vk::PixelFormat::CompressedAstc8x6RGBASrgb or MTLPixelFormatASTC_8x6_sRGB. No equivalent in D3D.

Astc8x6RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 8x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc8x6, GL::TextureFormat::CompressedRGBAAstc8x6; Vk::PixelFormat::CompressedAstc8x6RGBAF or MTLPixelFormatASTC_8x6_HDR. No equivalent in D3D.

Astc8x8RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 8x8 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc8x8, GL::TextureFormat::CompressedRGBAAstc8x8; Vk::PixelFormat::CompressedAstc8x8RGBAUnorm or MTLPixelFormatASTC_8x8_LDR. No equivalent in D3D.

Astc8x8RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 8x8 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc8x8, GL::TextureFormat::CompressedSRGB8Alpha8Astc8x8; Vk::PixelFormat::CompressedAstc8x8RGBASrgb or MTLPixelFormatASTC_8x8_sRGB. No equivalent in D3D.

Astc8x8RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 8x8 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc8x8, GL::TextureFormat::CompressedRGBAAstc8x8; Vk::PixelFormat::CompressedAstc8x8RGBAF or MTLPixelFormatASTC_8x8_HDR. No equivalent in D3D.

Astc10x5RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 10x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x5, GL::TextureFormat::CompressedRGBAAstc10x5; Vk::PixelFormat::CompressedAstc10x5RGBAUnorm or MTLPixelFormatASTC_10x5_LDR. No equivalent in D3D.

Astc10x5RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 10x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc10x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc10x5; Vk::PixelFormat::CompressedAstc10x5RGBASrgb or MTLPixelFormatASTC_10x5_sRGB. No equivalent in D3D.

Astc10x5RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 10x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x5, GL::TextureFormat::CompressedRGBAAstc10x5; Vk::PixelFormat::CompressedAstc10x5RGBAF or MTLPixelFormatASTC_10x5_HDR. No equivalent in D3D.

Astc10x6RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 10x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x6, GL::TextureFormat::CompressedRGBAAstc10x6; Vk::PixelFormat::CompressedAstc10x6RGBAUnorm or MTLPixelFormatASTC_10x6_LDR. No equivalent in D3D.

Astc10x6RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 10x6 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc10x6, GL::TextureFormat::CompressedSRGB8Alpha8Astc10x6; Vk::PixelFormat::CompressedAstc10x6RGBASrgb or MTLPixelFormatASTC_10x6_sRGB. No equivalent in D3D.

Astc10x6RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 10x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x6, GL::TextureFormat::CompressedRGBAAstc10x6; Vk::PixelFormat::CompressedAstc10x6RGBAF or MTLPixelFormatASTC_10x6_HDR. No equivalent in D3D.

Astc10x8RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 10x8 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x8, GL::TextureFormat::CompressedRGBAAstc10x8; Vk::PixelFormat::CompressedAstc10x8RGBAUnorm or MTLPixelFormatASTC_10x8_LDR. No equivalent in D3D.

Astc10x8RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 10x8 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc10x8, GL::TextureFormat::CompressedSRGB8Alpha8Astc10x8; Vk::PixelFormat::CompressedAstc10x8RGBASrgb or MTLPixelFormatASTC_10x8_sRGB. No equivalent in D3D.

Astc10x8RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 10x8 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x8, GL::TextureFormat::CompressedRGBAAstc10x8; Vk::PixelFormat::CompressedAstc10x8RGBAF or MTLPixelFormatASTC_10x8_HDR. No equivalent in D3D.

Astc10x10RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 10x10 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x10, GL::TextureFormat::CompressedRGBAAstc10x10; Vk::PixelFormat::CompressedAstc10x10RGBAUnorm or MTLPixelFormatASTC_10x10_LDR. No equivalent in D3D.

Astc10x10RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 10x10 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc10x10, GL::TextureFormat::CompressedSRGB8Alpha8Astc10x10; Vk::PixelFormat::CompressedAstc10x10RGBASrgb or MTLPixelFormatASTC_10x10_sRGB. No equivalent in D3D.

Astc10x10RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 10x10 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc10x10, GL::TextureFormat::CompressedRGBAAstc10x10; Vk::PixelFormat::CompressedAstc10x10RGBAF or MTLPixelFormatASTC_10x10_HDR. No equivalent in D3D.

Astc12x10RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 12x10 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc12x10, GL::TextureFormat::CompressedRGBAAstc12x10; Vk::PixelFormat::CompressedAstc12x10RGBAUnorm or MTLPixelFormatASTC_12x10_LDR. No equivalent in D3D.

Astc12x10RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 12x10 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc12x10, GL::TextureFormat::CompressedSRGB8Alpha8Astc12x10; Vk::PixelFormat::CompressedAstc12x10RGBASrgb or MTLPixelFormatASTC_12x10_sRGB. No equivalent in D3D.

Astc12x10RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 12x10 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc12x10, GL::TextureFormat::CompressedRGBAAstc12x10; Vk::PixelFormat::CompressedAstc12x10RGBAF or MTLPixelFormatASTC_12x10_HDR. No equivalent in D3D.

Astc12x12RGBAUnorm new in 2019.10

2D LDR ASTC compressed RGBA, normalized unsigned with 12x12 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc12x12, GL::TextureFormat::CompressedRGBAAstc12x12; Vk::PixelFormat::CompressedAstc12x12RGBAUnorm or MTLPixelFormatASTC_12x12_LDR. No equivalent in D3D.

Astc12x12RGBASrgb new in 2019.10

2D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 12x12 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc12x12, GL::TextureFormat::CompressedSRGB8Alpha8Astc12x12; Vk::PixelFormat::CompressedAstc12x12RGBASrgb or MTLPixelFormatASTC_12x12_sRGB. No equivalent in D3D.

Astc12x12RGBAF new in 2019.10

2D HDR ASTC compressed RGBA, float with 12x12 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc12x12, GL::TextureFormat::CompressedRGBAAstc12x12; Vk::PixelFormat::CompressedAstc12x12RGBAF or MTLPixelFormatASTC_12x12_HDR. No equivalent in D3D.

Astc3x3x3RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 3x3x3 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc3x3x3, GL::TextureFormat::CompressedRGBAAstc3x3x3; and VK_FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc3x3x3RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 3x3x3 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc3x3x3, GL::TextureFormat::CompressedSRGB8Alpha8Astc3x3x3; and VK_FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc3x3x3RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 3x3x3 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc3x3x3, GL::TextureFormat::CompressedRGBAAstc3x3x3; and VK_FORMAT_ASTC_3x3x3_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x3x3RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 4x3x3 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x3x3, GL::TextureFormat::CompressedRGBAAstc4x3x3; and VK_FORMAT_ASTC_4x3x3_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x3x3RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 4x3x3 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc4x3x3, GL::TextureFormat::CompressedSRGB8Alpha8Astc4x3x3; and VK_FORMAT_ASTC_4x3x3_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x3x3RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 4x3x3 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x3x3, GL::TextureFormat::CompressedRGBAAstc4x3x3; and VK_FORMAT_ASTC_4x3x3_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x4x3RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 4x4x3 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x4x3, GL::TextureFormat::CompressedRGBAAstc4x4x3; and VK_FORMAT_ASTC_4x4x3_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x4x3RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 4x4x3 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc4x4x3, GL::TextureFormat::CompressedSRGB8Alpha8Astc4x4x3; and VK_FORMAT_ASTC_4x4x3_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x4x3RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 4x4x3 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x4x3, GL::TextureFormat::CompressedRGBAAstc4x4x3; and VK_FORMAT_ASTC_4x4x3_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x4x4RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 4x4x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x4x4, GL::TextureFormat::CompressedRGBAAstc4x4x4; and VK_FORMAT_ASTC_4x4x4_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x4x4RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 4x4x4 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc4x4x4, GL::TextureFormat::CompressedSRGB8Alpha8Astc4x4x4; and VK_FORMAT_ASTC_4x4x4_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc4x4x4RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 4x4x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc4x4x4, GL::TextureFormat::CompressedRGBAAstc4x4x4; and VK_FORMAT_ASTC_4x4x4_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x4x4RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 5x4x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x4x4, GL::TextureFormat::CompressedRGBAAstc5x4x4; and VK_FORMAT_ASTC_5x4x4_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x4x4RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 5x4x4 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc5x4x4, GL::TextureFormat::CompressedSRGB8Alpha8Astc5x4x4; and VK_FORMAT_ASTC_5x4x4_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x4x4RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 5x4x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x4x4, GL::TextureFormat::CompressedRGBAAstc5x4x4; and VK_FORMAT_ASTC_5x4x4_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x5x4RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 5x5x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x5x4, GL::TextureFormat::CompressedRGBAAstc5x5x4; and VK_FORMAT_ASTC_5x5x4_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x5x4RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 5x5x4 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc5x5x4, GL::TextureFormat::CompressedSRGB8Alpha8Astc5x5x4; and VK_FORMAT_ASTC_5x5x4_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x5x4RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 5x5x4 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x5x4, GL::TextureFormat::CompressedRGBAAstc5x5x4; and VK_FORMAT_ASTC_5x5x4_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x5x5RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 5x5x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x5x5, GL::TextureFormat::CompressedRGBAAstc5x5x5; and VK_FORMAT_ASTC_5x5x5_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x5x5RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 5x5x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc5x5x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc5x5x5; and VK_FORMAT_ASTC_5x5x5_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc5x5x5RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 5x5x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc5x5x5, GL::TextureFormat::CompressedRGBAAstc5x5x5; and VK_FORMAT_ASTC_5x5x5_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x5x5RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 6x5x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x5x5, GL::TextureFormat::CompressedRGBAAstc6x5x5; and VK_FORMAT_ASTC_6x5x5_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x5x5RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 6x5x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc6x5x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc6x5x5; and VK_FORMAT_ASTC_6x5x5_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x5x5RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 6x5x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x5x5, GL::TextureFormat::CompressedRGBAAstc6x5x5; and VK_FORMAT_ASTC_6x5x5_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x6x5RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 6x6x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x6x5, GL::TextureFormat::CompressedRGBAAstc6x6x5; and VK_FORMAT_ASTC_6x6x5_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x6x5RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 6x6x5 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc6x6x5, GL::TextureFormat::CompressedSRGB8Alpha8Astc6x6x5; and VK_FORMAT_ASTC_6x6x5_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x6x5RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 6x6x5 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x6x5, GL::TextureFormat::CompressedRGBAAstc6x6x5; and VK_FORMAT_ASTC_6x6x5_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x6x6RGBAUnorm new in 2019.10

3D LDR ASTC compressed RGBA, normalized unsigned with 6x6x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x6x6, GL::TextureFormat::CompressedRGBAAstc6x6x6; and VK_FORMAT_ASTC_6x6x6_UNORM_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x6x6RGBASrgb new in 2019.10

3D LDR ASTC compressed sRGB + linear alpha, normalized unsigned with 6x6x6 blocks.

Corresponds to GL::CompressedPixelFormat::SRGB8Alpha8Astc6x6x6, GL::TextureFormat::CompressedSRGB8Alpha8Astc6x6x6; and VK_FORMAT_ASTC_6x6x6_SRGB_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

Astc6x6x6RGBAF new in 2019.10

3D HDR ASTC compressed RGBA, float with 6x6x6 blocks.

Corresponds to GL::CompressedPixelFormat::RGBAAstc6x6x6, GL::TextureFormat::CompressedRGBAAstc6x6x6; and VK_FORMAT_ASTC_6x6x6_SFLOAT_BLOCK_EXT (not a part of the spec yet, only defined in KTX). No equivalent in Metal or D3D.

PvrtcRGB2bppUnorm new in 2019.10

PVRTC compressed RGB, normalized unsigned byte with 2 bits per pixel.

Corresponds to GL::CompressedPixelFormat::RGBPvrtc2bppV1, GL::TextureFormat::CompressedRGBPvrtc2bppV1; Vk::PixelFormat::CompressedPvrtcRGBA2bppUnorm or MTLPixelFormatPVRTC_RGB_2BPP. No equivalent in D3D.

PvrtcRGB2bppSrgb new in 2019.10

PVRTC compressed sRGB, normalized unsigned byte with 2 bits per pixel.

Corresponds to GL::CompressedPixelFormat::SRGBPvrtc2bppV1, GL::TextureFormat::CompressedSRGBPvrtc2bppV1; Vk::PixelFormat::CompressedPvrtcRGBA2bppSrgb or MTLPixelFormatPVRTC_RGB_2BPP_sRGB. No equivalent in D3D.

PvrtcRGBA2bppUnorm new in 2019.10

PVRTC compressed RGBA, normalized unsigned byte with 2 bits per pixel.

Corresponds to GL::CompressedPixelFormat::RGBAPvrtc2bppV1, GL::TextureFormat::CompressedRGBAPvrtc2bppV1; Vk::PixelFormat::CompressedPvrtcRGBA2bppUnorm or MTLPixelFormatPVRTC_RGBA_2BPP. No equivalent in D3D.

PvrtcRGBA2bppSrgb new in 2019.10

PVRTC compressed sRGB + linear alpha, normalized unsigned byte with 2 bits per pixel.

Corresponds to GL::CompressedPixelFormat::SRGBAlphaPvrtc2bppV1, GL::TextureFormat::CompressedSRGBAlphaPvrtc2bppV1; Vk::PixelFormat::CompressedPvrtcRGBA2bppSrgb or MTLPixelFormatPVRTC_RGBA_2BPP_sRGB. No equivalent in D3D.

PvrtcRGB4bppUnorm new in 2019.10

PVRTC compressed RGB, normalized unsigned byte with 4 bits per pixel.

Corresponds to GL::CompressedPixelFormat::RGBPvrtc4bppV1, GL::TextureFormat::CompressedRGBPvrtc4bppV1; Vk::PixelFormat::CompressedPvrtcRGBA4bppUnorm or MTLPixelFormatPVRTC_RGB_4BPP. No equivalent in D3D.

PvrtcRGB4bppSrgb new in 2019.10

PVRTC compressed sRGB, normalized unsigned byte with 4 bits per pixel.

Corresponds to GL::CompressedPixelFormat::SRGBPvrtc4bppV1, GL::TextureFormat::CompressedSRGBPvrtc4bppV1; Vk::PixelFormat::CompressedPvrtcRGBA4bppSrgb or MTLPixelFormatPVRTC_RGB_4BPP_sRGB. No equivalent in D3D.

PvrtcRGBA4bppUnorm new in 2019.10

PVRTC compressed RGBA, normalized unsigned byte with 4 bits per pixel.

Corresponds to GL::CompressedPixelFormat::RGBAPvrtc4bppV1, GL::TextureFormat::CompressedRGBAPvrtc4bppV1; Vk::PixelFormat::CompressedPvrtcRGBA4bppUnorm or MTLPixelFormatPVRTC_RGBA_4BPP. No equivalent in D3D.

PvrtcRGBA4bppSrgb new in 2019.10

PVRTC compressed sRGB + linear alpha, normalized unsigned byte with 4 bits per pixel.

Corresponds to GL::CompressedPixelFormat::SRGBAlphaPvrtc4bppV1, GL::TextureFormat::CompressedSRGBAlphaPvrtc4bppV1; Vk::PixelFormat::CompressedPvrtcRGBA4bppUnorm or MTLPixelFormatPVRTC_RGBA_4BPP_sRGB. No equivalent in D3D.

enum class Magnum::ResourceState: UnsignedByte

Resource state.

Enumerators
NotLoaded

The resource is not yet loaded (and no fallback is available).

NotLoadedFallback

The resource is not yet loaded and fallback resource is used instead.

Loading

The resource is currently loading (and no fallback is available).

LoadingFallback

The resource is currently loading and fallback resource is used instead.

NotFound

The resource was not found (and no fallback is available).

NotFoundFallback

The resource was not found and fallback resource is used instead.

Mutable

The resource is loaded, but can be changed by the manager at any time.

Final

The resource is loaded and won't be changed by the manager anymore.

enum class Magnum::ResourceDataState: UnsignedByte

Resource data state.

Enumerators
Loading

The resource is currently loading. Parameter data in ResourceManager::set() should be set to nullptr.

NotFound

The resource was not found. Parameter data in ResourceManager::set() should be set to nullptr.

Mutable

The resource can be changed by the manager in the future. This is slower, as Resource needs to ask the manager for new version every time the data are accessed, but allows changing the data for e.g. debugging purposes.

Final

The resource cannot be changed by the manager in the future. This is faster, as Resource instances will ask for the data only one time, thus suitable for production code.

enum class Magnum::ResourcePolicy: UnsignedByte

Resource policy.

Enumerators
Resident

The resource will stay resident for whole lifetime of resource manager.

Manual

The resource will be unloaded when manually calling ResourceManager::free() if nothing references it.

ReferenceCounted

The resource will be unloaded when last reference to it is gone.

enum class Magnum::SamplerFilter: UnsignedInt

Texture sampler filtering.

In case of OpenGL, corresponds to GL::SamplerFilter and is convertible to it using GL::samplerFilter(). See documentation of each value for more information about the mapping.

In case of Vulkan, corresponds to Vk::SamplerFilter and is convertible to it using Vk::samplerFilter(). See documentation of each value for more information about the mapping.

Enumerators
Nearest

Nearest neighbor filtering.

Corresponds to GL::SamplerFilter::Nearest / Vk::SamplerFilter::Nearest.

Linear

Linear interpolation filtering.

Corresponds to GL::SamplerFilter::Linear / Vk::SamplerFilter::Linear.

enum class Magnum::SamplerMipmap: UnsignedInt

Texture sampler mip level selection.

In case of OpenGL, corresponds to GL::SamplerMipmap and is convertible to it using GL::samplerMipmap(). See documentation of each value for more information about the mapping.

In case of Vulkan, corresponds to Vk::SamplerMipmap and is convertible to it using Vk::samplerMipmap(). See documentation of each value for more information about the mapping.

Enumerators
Base

Select base mip level

Corresponds to GL::SamplerMipmap::Base. On Vulkan, the corresponding mode is Vk::SamplerMipmap::Nearest and you have to configure the sampler to use just a single mipmap level.

Nearest

Select nearest mip level.

Corresponds to GL::SamplerMipmap::Nearest / Vk::SamplerMipmap::Nearest.

Linear

Linear interpolation of nearest mip levels.

Corresponds to GL::SamplerMipmap::Linear / Vk::SamplerMipmap::Linear.

enum class Magnum::SamplerWrapping: UnsignedInt

Texture sampler wrapping.

In case of OpenGL, corresponds to GL::SamplerWrapping and is convertible to it using GL::samplerWrapping(). See documentation of each value for more information about the mapping. Note that not every mode is available on all targets, use GL::hasSamplerWrapping() to check for its presence.

In case of Vulkan, corresponds to Vk::SamplerWrapping and is convertible to it using Vk::samplerWrapping(). See documentation of each value for more information about the mapping.

Enumerators
Repeat

Repeat the texture.

Corresponds to GL::SamplerWrapping::Repeat / Vk::SamplerWrapping::Repeat.

MirroredRepeat

Repeat a mirrored texture.

Corresponds to GL::SamplerWrapping::MirroredRepeat / Vk::SamplerWrapping::MirroredRepeat.

ClampToEdge

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

Corresponds to GL::SamplerWrapping::ClampToEdge / Vk::SamplerWrapping::ClampToEdge.

ClampToBorder

Clamp to border color. Coordinates out of range will be clamped to the border color.

Corresponds to GL::SamplerWrapping::ClampToBorder / Vk::SamplerWrapping::ClampToBorder.

MirrorClampToEdge

Mirror the texture once in negative coordinates and clamp to edge after that.

Corresponds to GL::SamplerWrapping::MirrorClampToEdge. / Vk::SamplerWrapping::MirrorClampToEdge.

enum class Magnum::VertexFormat: UnsignedInt new in 2020.06

Vertex format.

Like PixelFormat, but for mesh attributes — including double-precision formats and matrices. Can act also as a wrapper for implementation-specific vertex format values using vertexFormatWrap() and vertexFormatUnwrap(). Distinction between generic and implementation-specific formats can be done using isVertexFormatImplementationSpecific().

In case of OpenGL, corresponds to a tuple of GL::DynamicAttribute::Kind, GL::DynamicAttribute::Components and GL::DynamicAttribute::DataType and is convertible to them using GL::DynamicAttribute::DynamicAttribute(Kind, UnsignedInt, VertexFormat). See documentation of each value for more information about the mapping. Note that not every format is available on all targets, use GL::hasVertexFormat() to check for its presence.

In case of Vulkan, corresponds to Vk::VertexFormat and is convertible to it using Vk::vertexFormat(). See documentation of each value for more information about the mapping. Note that not every format may be available, use Vk::hasVertexFormat() to check for its presence.

For D3D, corresponds to DXGI_FORMAT; for Metal, corresponds to MTLVertexFormat. See documentation of each value for more information about the mapping.

See also vertexFormatSize(), vertexFormatComponentFormat(), vertexFormatComponentCount(), vertexFormatVectorCount(), vertexFormatVectorStride(), isVertexFormatNormalized() and vertexFormat() for querying various aspects of a format and assembling it from a set of singular properties.

Enumerators
Float

Float.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Float; Vk::VertexFormat::Float; DXGI_FORMAT_R32_FLOAT or MTLVertexFormatFloat.

Half

Half.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Half; Vk::VertexFormat::Half; DXGI_FORMAT_R16_FLOAT or MTLVertexFormatHalf.

Double

Double.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Long GL::DynamicAttribute::DataType::Double; Vk::VertexFormat::Double. No D3D or Metal equivalent.

UnsignedByte

UnsignedByte.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::UnsignedByte; DXGI_FORMAT_R8_UINT or MTLVertexFormatUChar

UnsignedByteNormalized

UnsignedByte, with range $ [0, 255] $ interpreted as $ [0.0, 1.0] $ .

Corresponds to single-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::UnsignedByteNormalized; DXGI_FORMAT_R8_UNORM or MTLVertexFormatUCharNormalized.

Byte

Byte.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Byte; DXGI_FORMAT_R8_SINT or MTLVertexFormatChar.

ByteNormalized

Byte, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Corresponds to single-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::ByteNormalized; DXGI_FORMAT_R8_SNORM or MTLVertexFormatCharNormalized.

UnsignedShort

UnsignedShort.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedShort; Vk::VertexFormat::UnsignedShort; DXGI_FORMAT_R16_UINT or MTLVertexFormatUShort.

UnsignedShortNormalized

UnsignedShort, with range $ [0, 65535] $ interpreted as $ [0.0, 1.0] $ .

Corresponds to single-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::UnsignedShortNormalized; DXGI_FORMAT_R16_UNORM or MTLVertexFormatUShortNormalized.

Short

Short.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Short; DXGI_FORMAT_R16_SINT or MTLVertexFormatShort.

ShortNormalized

Short, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Corresponds to single-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::ShortNormalized; DXGI_FORMAT_R16_SNORM or MTLVertexFormatShortNormalized.

UnsignedInt

UnsignedInt.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedInt; Vk::VertexFormat::UnsignedInt; DXGI_FORMAT_R32_UINT or MTLVertexFormatUInt.

Int

Int.

Corresponds to single-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Int; Vk::VertexFormat::Int; DXGI_FORMAT_R32_SINT or MTLVertexFormatInt.

Vector2

Vector2. Usually used for 2D positions and 2D texture coordinates.

Corresponds to two-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Float; Vk::VertexFormat::Vector2; DXGI_FORMAT_R32G32_FLOAT or MTLVertexFormatFloat2.

Vector2h

Vector2h. Can be used instead of VertexFormat::Vector2 for 2D positions and 2D texture coordinates.

Corresponds to two-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Half; Vk::VertexFormat::Vector2h; DXGI_FORMAT_R16G16_FLOAT or MTLVertexFormatHalf2.

Vector2d

Vector2d.

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Long GL::DynamicAttribute::DataType::Double; Vk::VertexFormat::Vector2d. No D3D or Metal equivalent.

Vector2ub

Vector2ub. Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates, in which case the range $ [0, 255] $ is interpreted as $ [0.0, 255.0] $ .

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector2ub; DXGI_FORMAT_R8G8_UINT or MTLVertexFormatUChar2.

Vector2ubNormalized

Vector2ub, with range $ [0, 255] $ interpreted as $ [0.0, 1.0] $ . Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates.

Corresponds to two-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector2ubNormalized; DXGI_FORMAT_R8G8_UNORM or MTLVertexFormatUChar2Normalized.

Vector2b

Vector2b. Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates, in which case the range $ [-128, 127] $ is interpreted as $ [-128.0, 127.0] $ .

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Vector2b; DXGI_FORMAT_R8G8_SINT or MTLVertexFormatChar2.

Vector2bNormalized

Vector2b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ . Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates.

Corresponds to two-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Vector2bNormalized; DXGI_FORMAT_R8G8_SNORM or MTLVertexFormatChar2Normalized.

Vector2us

Vector2us. Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates, in which case the range $ [0, 65535] $ is interpreted as $ [0.0, 65535.0] $ .

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedShort; Vk::VertexFormat::Vector2usNormalized; DXGI_FORMAT_R16G16_UINT or MTLVertexFormatUShort2.

Vector2usNormalized

Vector2us, with range $ [0, 65535] $ interpreted as $ [0.0, 1.0] $ . Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates.

Corresponds to two-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector2usNormalized; DXGI_FORMAT_R16G16_UNORM or MTLVertexFormatUShort2Normalized.

Vector2s

Vector2s. Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates, in which case the range $ [-32768, 32767] $ is interpreted as $ [-32768.0, 32767.0] $ .

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Vector2s; DXGI_FORMAT_R16G16_SINT or MTLVertexFormatShort2.

Vector2sNormalized

Vector2s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ . Can be used instead of VertexFormat::Vector2 for packed 2D positions and 2D texture coordinates.

Corresponds to two-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Vector2sNormalized; DXGI_FORMAT_R16G16_SNORM or MTLVertexFormatShort2Normalized.

Vector2ui

Vector2ui.

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedInt; Vk::VertexFormat::Vector2ui; DXGI_FORMAT_R32G32_UINT or MTLVertexFormatUInt2.

Vector2i

Vector2i.

Corresponds to two-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Int; Vk::VertexFormat::Vector2i; DXGI_FORMAT_R32G32_SINT or MTLVertexFormatInt2.

Vector3

Vector3 or Color3. Usually used for 3D positions, normals and three-component colors.

Corresponds to three-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Float; Vk::VertexFormat::Vector3; DXGI_FORMAT_R32G32B32_FLOAT or MTLVertexFormatFloat3.

Vector3h

Vector3h or Color3h. Can be used instead of VertexFormat::Vector3 for packed 3D positions and three-component colors.

Corresponds to three-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Half; Vk::VertexFormat::Vector3h; DXGI_FORMAT_R16G16B16_FLOAT or MTLVertexFormatHalf3.

Vector3d

Vector3d.

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Long GL::DynamicAttribute::DataType::Double; Vk::VertexFormat::Vector3d. No D3D or Metal equivalent.

Vector3ub

Vector3ub. Can be used instead of VertexFormat::Vector3 for packed 3D positions, in which case the range $ [0, 255] $ is interpreted as $ [0.0, 255.0] $ .

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector3ub; DXGI_FORMAT_R8G8B8_UINT or MTLVertexFormatUChar3.

Vector3ubNormalized

Vector3ub or Color3ub, with range $ [0, 255] $ interpreted as $ [0.0, 1.0] $ . Can be used instead of VertexFormat::Vector3 for packed 3D positions and three-component colors.

Corresponds to three-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector3ubNormalized; DXGI_FORMAT_R8G8B8_UNORM or MTLVertexFormatUChar3Normalized.

Vector3b

Vector3b. Can be used instead of VertexFormat::Vector3 for packed 3D positions, in which case the range $ [-128, 127] $ is interpreted as $ [-128.0, 127.0] $ .

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Vector3b; DXGI_FORMAT_R8G8B8_SINT or MTLVertexFormatChar3.

Vector3bNormalized

Vector3b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ . Can be used instead of VertexFormat::Vector3 for packed 3D positions and normals.

Corresponds to three-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Vector3bNormalized; DXGI_FORMAT_R8G8B8_SNORM or MTLVertexFormatChar3Normalized.

Vector3us

Vector3us. Can be used instead of VertexFormat::Vector3 for packed 2D positions, in which case the range $ [0, 65535] $ is interpreted as $ [0.0, 65535.0] $ .

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedShort; Vk::VertexFormat::Vector3us; DXGI_FORMAT_R16G16B16_UINT or MTLVertexFormatUShort3.

Vector3usNormalized

Vector3us or Color3us, with range $ [0, 65535] $ interpreted as $ [0.0, 1.0] $ . Can be used instead of VertexFormat::Vector2 for packed 3D positions and three-component colors.

Corresponds to three-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector3usNormalized; DXGI_FORMAT_R16G16B16_UNORM or MTLVertexFormatUShort3Normalized.

Vector3s

Vector3s. Can be used instead of VertexFormat::Vector3 for packed 3D positions, in which case the range $ [-32768, 32767] $ is interpreted as $ [-32768.0, 32767.0] $ .

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Vector3s; DXGI_FORMAT_R16G16B16_SINT or MTLVertexFormatShort3.

Vector3sNormalized

Vector3s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ . Can be used instead of VertexFormat::Vector3 for packed 3D positions and normals.

Corresponds to three-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Vector3sNormalized; DXGI_FORMAT_R16G16B16_SNORM or MTLVertexFormatShort3Normalized.

Vector3ui

Vector3ui.

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedInt; Vk::VertexFormat::Vector3ui; DXGI_FORMAT_R32G32B32_UINT or MTLVertexFormatUInt3.

Vector3i

Vector3i.

Corresponds to three-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Int; Vk::VertexFormat::Vector3i; DXGI_FORMAT_R32G32B32_SINT or MTLVertexFormatInt3.

Vector4

Vector4 or Color4. Usually used for four-component colors.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Float; Vk::VertexFormat::Vector4; DXGI_FORMAT_R32G32B32A32_FLOAT or MTLVertexFormatFloat4.

Vector4h

Vector4h or Color4h. Can be used instead of VertexFormat::Vector4 for four-component colors.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic GL::DynamicAttribute::DataType::Half; Vk::VertexFormat::Vector4h; DXGI_FORMAT_R16G16B16A16_FLOAT or MTLVertexFormatHalf4.

Vector4d

Vector4d.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Long GL::DynamicAttribute::DataType::Double; Vk::VertexFormat::Vector4d. No D3D or Metal equivalent.

Vector4ub

Vector4ub.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector4ub; DXGI_FORMAT_R8G8B8A8_UINT or MTLVertexFormatUChar4.

Vector4ubNormalized

Vector4ub or Color4ub, with range $ [0, 255] $ interpreted as $ [0.0, 1.0] $ . Can be used instead of VertexFormat::Vector4 for packed linear four-component colors.

Corresponds to four-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector4ubNormalized; DXGI_FORMAT_R8G8B8A8_UNORM or MTLVertexFormatUChar4Normalized.

Vector4b

Vector4b.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Vector4b; DXGI_FORMAT_R8G8B8A8_SINT or MTLVertexFormatChar4.

Vector4bNormalized

Vector4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Corresponds to four-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Byte; Vk::VertexFormat::Vector4bNormalized; DXGI_FORMAT_R8G8B8A8_SNORM or MTLVertexFormatChar4Normalized.

Vector4us

Vector4us.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedShort; Vk::VertexFormat::Vector4us; DXGI_FORMAT_R16G16B16A16_UINT or MTLVertexFormatUShort4.

Vector4usNormalized

Vector4us or Color4us, with range $ [0, 65535] $ interpreted as $ [0.0, 1.0] $ . Can be used instead of VertexFormat::Vector4 for packed linear four-component colors.

Corresponds to four-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::UnsignedByte; Vk::VertexFormat::Vector4usNormalized; DXGI_FORMAT_R16G16B16A16_UNORM or MTLVertexFormatUShort4Normalized.

Vector4s

Vector4s.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Vector4s; DXGI_FORMAT_R16G16B16A16_SINT or MTLVertexFormatShort4.

Vector4sNormalized

Vector4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Corresponds to four-component GL::DynamicAttribute::Kind::GenericNormalized GL::DynamicAttribute::DataType::Short; Vk::VertexFormat::Vector4sNormalized; DXGI_FORMAT_R16G16B16A16_SNORM or MTLVertexFormatShort4Normalized.

Vector4ui

Vector4ui.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::UnsignedInt; Vk::VertexFormat::Vector4ui; DXGI_FORMAT_R32G32B32A32_UINT or MTLVertexFormatUInt4.

Vector4i

Vector4i.

Corresponds to four-component GL::DynamicAttribute::Kind::Generic or GL::DynamicAttribute::Kind::Integral GL::DynamicAttribute::DataType::Int; Vk::VertexFormat::Vector4i; DXGI_FORMAT_R32G32B32A32_SINT or MTLVertexFormatInt4.

Matrix2x2

Matrix2x2.

Same as two VertexFormat::Vector2 tightly following each other and bound to consecutive locations.

Matrix2x2h

Matrix2x2h.

Same as two VertexFormat::Vector2h tightly following each other and bound to consecutive locations.

Matrix2x2d

Matrix2x2d.

Same as two VertexFormat::Vector2d tightly following each other and bound to consecutive locations.

Matrix2x2bNormalized

Matrix2x2b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as two VertexFormat::Vector2bNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix2x2bNormalizedAligned instead.

Matrix2x2sNormalized

Matrix2x2s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as two VertexFormat::Vector2sNormalized tightly following each other and bound to consecutive locations.

Matrix2x3

Matrix2x3.

Same as two VertexFormat::Vector3 tightly following each other and bound to consecutive locations.

Matrix2x3h

Matrix2x3h.

Same as two VertexFormat::Vector3h tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance on some APIs — prefer to use VertexFormat::Matrix2x3hAligned instead.

Matrix2x3d

Matrix2x3d.

Same as two VertexFormat::Vector3d tightly following each other and bound to consecutive locations.

Matrix2x3bNormalized

Matrix2x3b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as two VertexFormat::Vector3bNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix2x3bNormalizedAligned instead.

Matrix2x3sNormalized

Matrix2x3s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as two VertexFormat::Vector3sNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix2x3sNormalizedAligned instead.

Matrix2x4

Matrix2x4.

Same as two VertexFormat::Vector4 tightly following each other and bound to consecutive locations.

Matrix2x4h

Matrix2x4h.

Same as two VertexFormat::Vector4h tightly following each other and bound to consecutive locations.

Matrix2x4d

Matrix2x4d.

Same as two VertexFormat::Vector4d tightly following each other and bound to consecutive locations.

Matrix2x4bNormalized

Matrix2x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as two VertexFormat::Vector4bNormalized tightly following each other and bound to consecutive locations.

Matrix2x4sNormalized

Matrix2x4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as two VertexFormat::Vector4sNormalized tightly following each other and bound to consecutive locations.

Matrix2x2bNormalizedAligned

Matrix2x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ and bottom two rows ignored. A variant of VertexFormat::Matrix2x2bNormalized that has columns four-byte aligned.

Same as two VertexFormat::Vector2bNormalized following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix2x3hAligned

Matrix2x4h, with bottom row ignored. A variant of VertexFormat::Matrix2x3h that has columns four-byte aligned.

Same as two VertexFormat::Vector3s following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix2x3bNormalizedAligned

Matrix2x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ and bottom row ignored. A variant of VertexFormat::Matrix2x3bNormalized that has columns four-byte aligned.

Same as two VertexFormat::Vector3bNormalized following each other with a 1-byte gap in between, bound to consecutive locations.

Matrix2x3sNormalizedAligned

Matrix2x4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ and bottom row ignored. A variant of VertexFormat::Matrix2x3sNormalized that has columns four-byte aligned.

Same as two VertexFormat::Vector3sNormalized following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix3x2

Matrix3x2.

Same as three VertexFormat::Vector2 tightly following each other and bound to consecutive locations.

Matrix3x2h

Matrix3x2h.

Same as three VertexFormat::Vector2h tightly following each other and bound to consecutive locations.

Matrix3x2d

Matrix3x2d.

Same as three VertexFormat::Vector2d tightly following each other and bound to consecutive locations.

Matrix3x2bNormalized

Matrix3x2b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as three VertexFormat::Vector2bNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix3x2bNormalizedAligned instead.

Matrix3x2sNormalized

Matrix3x2s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as three VertexFormat::Vector2sNormalized tightly following each other and bound to consecutive locations.

Matrix3x3

Matrix3x3 or Matrix3.

Same as three VertexFormat::Vector3 tightly following each other and bound to consecutive locations.

Matrix3x3h

Matrix3x3h.

Same as three VertexFormat::Vector3h tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance on some APIs — prefer to use VertexFormat::Matrix3x3hAligned instead.

Matrix3x3d

Matrix3x3d or Matrix3d.

Same as three VertexFormat::Vector3d tightly following each other and bound to consecutive locations.

Matrix3x3bNormalized

Matrix3x3b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as three VertexFormat::Vector3bNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix3x3bNormalizedAligned instead.

Matrix3x3sNormalized

Matrix3x3s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as three VertexFormat::Vector3sNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix3x3sNormalizedAligned instead.

Matrix3x4

Matrix3x4.

Same as three VertexFormat::Vector4 tightly following each other and bound to consecutive locations.

Matrix3x4h

Matrix3x4h.

Same as three VertexFormat::Vector4h tightly following each other and bound to consecutive locations.

Matrix3x4d

Matrix3x4d.

Same as three VertexFormat::Vector4d tightly following each other and bound to consecutive locations.

Matrix3x4bNormalized

Matrix3x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as three VertexFormat::Vector4bNormalized tightly following each other and bound to consecutive locations.

Matrix3x4sNormalized

Matrix3x4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as three VertexFormat::Vector4sNormalized tightly following each other and bound to consecutive locations.

Matrix3x2bNormalizedAligned

Matrix3x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ and bottom two rows ignored. A variant of VertexFormat::Matrix3x2bNormalized that has columns four-byte aligned.

Same as three VertexFormat::Vector2bNormalized following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix3x3hAligned

Matrix3x4h, with bottom row ignored. A variant of VertexFormat::Matrix3x3h that has columns four-byte aligned.

Same as three VertexFormat::Vector3s following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix3x3bNormalizedAligned

Matrix3x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ and bottom row ignored. A variant of VertexFormat::Matrix3x3bNormalized that has columns four-byte aligned.

Same as three VertexFormat::Vector3bNormalized following each other with a 1-byte gap in between, bound to consecutive locations.

Matrix3x3sNormalizedAligned

Matrix3x4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ and bottom row ignored. A variant of VertexFormat::Matrix3x3sNormalized that has columns four-byte aligned.

Same as three VertexFormat::Vector3sNormalized following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix4x2

Matrix4x2.

Same as four VertexFormat::Vector2 tightly following each other and bound to consecutive locations.

Matrix4x2h

Matrix4x2h.

Same as four VertexFormat::Vector2h tightly following each other and bound to consecutive locations.

Matrix4x2d

Matrix4x2d.

Same as four VertexFormat::Vector2d tightly following each other and bound to consecutive locations.

Matrix4x2bNormalized

Matrix4x2b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as four VertexFormat::Vector2bNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix4x2bNormalizedAligned instead.

Matrix4x2sNormalized

Matrix4x2s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as four VertexFormat::Vector2sNormalized tightly following each other and bound to consecutive locations.

Matrix4x3

Matrix4x3.

Same as four VertexFormat::Vector3 tightly following each other and bound to consecutive locations.

Matrix4x3h

Matrix4x3h.

Same as four VertexFormat::Vector3h tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance on some APIs — prefer to use VertexFormat::Matrix4x3hAligned instead.

Matrix4x3d

Matrix4x3d.

Same as four VertexFormat::Vector3d tightly following each other and bound to consecutive locations.

Matrix4x3bNormalized

Matrix4x3b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as four VertexFormat::Vector3bNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix4x3bNormalizedAligned instead.

Matrix4x3sNormalized

Matrix4x3s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as four VertexFormat::Vector3sNormalized tightly following each other and bound to consecutive locations. Note that this format doesn't have the columns four-byte aligned, which may negatively affect performance — prefer to use VertexFormat::Matrix4x3sNormalizedAligned instead.

Matrix4x4

Matrix4x4 or Matrix4.

Same as four VertexFormat::Vector4 tightly following each other and bound to consecutive locations.

Matrix4x4h

Matrix4x4h.

Same as four VertexFormat::Vector4h tightly following each other and bound to consecutive locations.

Matrix4x4d

Matrix4x4d.

Same as four VertexFormat::Vector4d tightly following each other and bound to consecutive locations.

Matrix4x4bNormalized

Matrix4x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ .

Same as four VertexFormat::Vector4bNormalized tightly following each other and bound to consecutive locations.

Matrix4x4sNormalized

Matrix4x4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ .

Same as four VertexFormat::Vector4sNormalized tightly following each other and bound to consecutive locations.

Matrix4x2bNormalizedAligned

Matrix4x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ and bottom two rows ignored. A variant of VertexFormat::Matrix4x2bNormalized that has columns four-byte aligned.

Same as four VertexFormat::Vector2bNormalized following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix4x3hAligned

Matrix4x4h, with bottom row ignored. A variant of VertexFormat::Matrix3x3h that has columns four-byte aligned.

Same as four VertexFormat::Vector3s following each other with a 2-byte gap in between, bound to consecutive locations.

Matrix4x3bNormalizedAligned

Matrix4x4b, with range $ [-127, 127] $ interpreted as $ [-1.0, 1.0] $ and bottom row ignored. A variant of VertexFormat::Matrix4x3bNormalized that has columns four-byte aligned.

Same as four VertexFormat::Vector3bNormalized following each other with a 1-byte gap in between, bound to consecutive locations.

Matrix4x3sNormalizedAligned

Matrix4x4s, with range $ [-32767, 32767] $ interpreted as $ [-1.0, 1.0] $ and bottom row ignored. A variant of VertexFormat::Matrix4x3sNormalized that has columns four-byte aligned.

Same as four VertexFormat::Vector3sNormalized following each other with a 2-byte gap in between, bound to consecutive locations.

Typedef documentation

template<UnsignedInt dimensions, class T>
using Magnum::VectorTypeFor = typename DimensionTraits<dimensions, T>::VectorType

Vector type for given dimension count and type.

Convenience alternative to typename DimensionTraits<dimensions, T>::VectorType. See DimensionTraits::VectorType for more information.

template<UnsignedInt dimensions, class T>
using Magnum::RangeTypeFor = typename DimensionTraits<dimensions, T>::RangeType

Range type for given dimension count and type.

Convenience alternative to typename DimensionTraits<dimensions, T>::RangeType. See DimensionTraits::RangeType for more information.

template<UnsignedInt dimensions, class T>
using Magnum::MatrixTypeFor = typename DimensionTraits<dimensions, T>::MatrixType

Matrix type for given dimension count and type.

Convenience alternative to typename DimensionTraits<dimensions, T>::MatrixType. See DimensionTraits::MatrixType for more information.

typedef Image<1> Magnum::Image1D

One-dimensional image.

typedef Image<2> Magnum::Image2D

Two-dimensional image.

typedef Image<3> Magnum::Image3D

Three-dimensional image.

typedef CompressedImage<1> Magnum::CompressedImage1D

One-dimensional compressed image.

typedef CompressedImage<2> Magnum::CompressedImage2D

Two-dimensional compressed image.

typedef CompressedImage<3> Magnum::CompressedImage3D

Three-dimensional compressed image.

template<UnsignedInt dimensions>
using Magnum::ImageFlag = typename Implementation::ImageFlagTraits<dimensions>::Type new in Git master

Image layout flag.

Expands to ImageFlag1D, ImageFlag2D or ImageFlag3D based on dimension count.

template<UnsignedInt dimensions>
using Magnum::ImageFlags = typename Implementation::ImageFlagTraits<dimensions>::SetType new in Git master

Image layout flags.

Expands to ImageFlags1D, ImageFlags2D or ImageFlags3D based on dimension count.

template<UnsignedInt dimensions>
using Magnum::BasicImageView = ImageView<dimensions, const char> new in 2019.10

Const image view.

typedef BasicImageView<1> Magnum::ImageView1D

One-dimensional image view.

typedef BasicImageView<2> Magnum::ImageView2D

Two-dimensional image view.

typedef BasicImageView<3> Magnum::ImageView3D

Three-dimensional image view.

template<UnsignedInt dimensions>
using Magnum::BasicMutableImageView = ImageView<dimensions, char> new in 2019.10

Mutable image view.

typedef BasicMutableImageView<1> Magnum::MutableImageView1D new in 2019.10

One-dimensional mutable image view.

typedef BasicMutableImageView<2> Magnum::MutableImageView2D new in 2019.10

Two-dimensional mutable image view.

typedef BasicMutableImageView<3> Magnum::MutableImageView3D new in 2019.10

Three-dimensional mutable image view.

template<UnsignedInt dimensions>
using Magnum::BasicCompressedImageView = CompressedImageView<dimensions, const char> new in 2019.10

Const compressed image view.

typedef BasicCompressedImageView<1> Magnum::CompressedImageView1D

One-dimensional compressed image view.

typedef BasicCompressedImageView<2> Magnum::CompressedImageView2D

Two-dimensional compressed image view.

typedef BasicCompressedImageView<3> Magnum::CompressedImageView3D

Three-dimensional compressed image view.

typedef Corrade::Utility::Debug Magnum::Debug

Alias for debug output.

A shorthand for the fully-qualified name in Corrade.

typedef Corrade::Utility::Warning Magnum::Warning

Alias for warning output.

A shorthand for the fully-qualified name in Corrade.

typedef Corrade::Utility::Error Magnum::Error

Alias for error output.

A shorthand for the fully-qualified name in Corrade.

typedef Corrade::Utility::Fatal Magnum::Fatal

Alias for fatal output.

A shorthand for the fully-qualified name in Corrade.

typedef Corrade::DefaultInitT Magnum::DefaultInitT new in Git master

Default initialization tag type.

Used to distinguish construction with default initialization. The actual meaning of "default" may vary, see documentation of a particular API using this tag for a detailed behavior description.

typedef Corrade::NoInitT Magnum::NoInitT new in 2020.06

No initialization tag type.

Used to distinguish construction with no initialization at all.

typedef Corrade::NoCreateT Magnum::NoCreateT

No creation tag type.

Used to distinguish construction without creating the underlying OpenGL / Vulkan / ... object.

typedef std::uint8_t Magnum::UnsignedByte

Unsigned byte (8bit)

typedef std::int8_t Magnum::Byte

Signed byte (8bit)

typedef std::uint16_t Magnum::UnsignedShort

Unsigned short (16bit)

typedef std::int16_t Magnum::Short

Signed short (16bit)

typedef std::uint32_t Magnum::UnsignedInt

Unsigned int (32bit)

Equivalent to GLSL uint.

typedef std::int32_t Magnum::Int

Signed int (32bit)

Equivalent to GLSL int.

typedef std::uint64_t Magnum::UnsignedLong

Unsigned long (64bit)

typedef std::int64_t Magnum::Long

Signed long (64bit)

typedef float Magnum::Float

Float (32bit)

Equivalent to GLSL float.

typedef Math::Half Magnum::Half

Half (16bit)

typedef Math::BitVector<2> Magnum::BitVector2 new in Git master

Two-component vector of bits.

Equivalent to GLSL bvec2.

typedef Math::BitVector<3> Magnum::BitVector3 new in Git master

Three-component vector of bits.

Equivalent to GLSL bvec3.

typedef Math::BitVector<4> Magnum::BitVector4 new in Git master

Four-component vector of bits.

Equivalent to GLSL bvec4.

typedef BitVector2 Magnum::BoolVector2

Two-component vector of bits.

typedef BitVector3 Magnum::BoolVector3

Three-component vector of bits.

typedef BitVector4 Magnum::BoolVector4

Four-component vector of bits.

typedef Math::Vector2<Float> Magnum::Vector2

Two-component float vector.

Equivalent to GLSL vec2.

typedef Math::Vector3<Float> Magnum::Vector3

Three-component float vector.

Equivalent to GLSL vec3.

typedef Math::Vector4<Float> Magnum::Vector4

Four-component float vector.

Equivalent to GLSL vec4.

typedef Math::Vector2<UnsignedByte> Magnum::Vector2ub new in 2020.06

Two-component unsigned byte vector.

typedef Math::Vector3<UnsignedByte> Magnum::Vector3ub new in 2020.06

Three-component unsigned byte vector.

typedef Math::Vector4<UnsignedByte> Magnum::Vector4ub new in 2020.06

Four-component unsigned byte vector.

typedef Math::Vector2<Byte> Magnum::Vector2b new in 2020.06

Two-component signed byte vector.

typedef Math::Vector3<Byte> Magnum::Vector3b new in 2020.06

Three-component signed byte vector.

typedef Math::Vector4<Byte> Magnum::Vector4b new in 2020.06

Four-component signed byte vector.

typedef Math::Vector2<UnsignedShort> Magnum::Vector2us new in 2020.06

Two-component unsigned short vector.

typedef Math::Vector3<UnsignedShort> Magnum::Vector3us new in 2020.06

Three-component unsigned short vector.

typedef Math::Vector4<UnsignedShort> Magnum::Vector4us new in 2020.06

Four-component unsigned short vector.

typedef Math::Vector2<Short> Magnum::Vector2s new in 2020.06

Two-component signed short vector.

typedef Math::Vector3<Short> Magnum::Vector3s new in 2020.06

Three-component signed short vector.

typedef Math::Vector4<Short> Magnum::Vector4s new in 2020.06

Four-component signed short vector.

typedef Math::Vector2<UnsignedInt> Magnum::Vector2ui

Two-component unsigned integer vector.

Equivalent to GLSL uvec2.

typedef Math::Vector3<UnsignedInt> Magnum::Vector3ui

Three-component unsigned integer vector.

Equivalent to GLSL uvec3.

typedef Math::Vector4<UnsignedInt> Magnum::Vector4ui

Four-component unsigned integer vector.

Equivalent to GLSL uvec4.

typedef Math::Vector2<Int> Magnum::Vector2i

Two-component signed integer vector.

Equivalent to GLSL ivec2.

typedef Math::Vector3<Int> Magnum::Vector3i

Three-component signed integer vector.

Equivalent to GLSL ivec3.

typedef Math::Vector4<Int> Magnum::Vector4i

Four-component signed integer vector.

Equivalent to GLSL ivec4.

typedef Math::Color3<Float> Magnum::Color3

Three-component (RGB) float color.

typedef Math::Color4<Float> Magnum::Color4

Four-component (RGBA) float color.

typedef Math::ColorHsv<Float> Magnum::ColorHsv

HSV float color.

typedef Math::Color3<UnsignedByte> Magnum::Color3ub

Three-component (RGB) unsigned byte color.

typedef Math::Color3<UnsignedShort> Magnum::Color3us new in 2020.06

Three-component (RGB) unsigned short color.

typedef Math::Color4<UnsignedByte> Magnum::Color4ub

Four-component (RGBA) unsigned byte color.

typedef Math::Color4<UnsignedShort> Magnum::Color4us new in 2020.06

Four-component (RGB) unsigned short color.

typedef Math::Matrix3<Float> Magnum::Matrix3

3x3 float transformation matrix

Equivalent to GLSL mat3.

typedef Math::Matrix4<Float> Magnum::Matrix4

4x4 float transformation matrix

Equivalent to GLSL mat4.

typedef Math::Matrix2x2<Float> Magnum::Matrix2x2

2x2 float matrix

Equivalent to GLSL mat2x2.

typedef Math::Matrix3x3<Float> Magnum::Matrix3x3

3x3 float matrix

Equivalent to GLSL mat3x3. Note that this is different from Matrix3, which contains additional functions for transformations in 2D.

typedef Math::Matrix4x4<Float> Magnum::Matrix4x4

4x4 float matrix

Equivalent to GLSL mat4x4. Note that this is different from Matrix4, which contains additional functions for transformations in 3D.

typedef Math::Matrix2x3<Float> Magnum::Matrix2x3

Float matrix with 2 columns and 3 rows.

Equivalent to GLSL mat2x3.

typedef Math::Matrix3x2<Float> Magnum::Matrix3x2

Float matrix with 3 columns and 2 rows.

Equivalent to GLSL mat3x2.

typedef Math::Matrix2x4<Float> Magnum::Matrix2x4

Float matrix with 2 columns and 4 rows.

Equivalent to GLSL mat2x4.

typedef Math::Matrix4x2<Float> Magnum::Matrix4x2

Float matrix with 4 columns and 2 rows.

Equivalent to GLSL mat2x4.

typedef Math::Matrix3x4<Float> Magnum::Matrix3x4

Float matrix with 3 columns and 4 rows.

Equivalent to GLSL mat3x4.

typedef Math::Matrix4x3<Float> Magnum::Matrix4x3

Float matrix with 4 columns and 3 rows.

Equivalent to GLSL mat4x3.

typedef Math::Matrix2x2<Byte> Magnum::Matrix2x2b new in 2020.06

Signed byte matrix with 2 columns and 2 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix2x4b and ignore the bottom two rows.

typedef Math::Matrix2x3<Byte> Magnum::Matrix2x3b new in 2020.06

Signed byte matrix with 2 columns and 3 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix2x4b and ignore the bottom row.

typedef Math::Matrix2x4<Byte> Magnum::Matrix2x4b new in 2020.06

Signed byte matrix with 2 columns and 4 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix3x2<Byte> Magnum::Matrix3x2b new in 2020.06

Signed byte matrix with 3 columns and 2 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix3x4b and ignore the bottom two rows.

typedef Math::Matrix3x3<Byte> Magnum::Matrix3x3b new in 2020.06

Signed byte matrix with 3 columns and 3 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix3x4b and ignore the bottom row.

typedef Math::Matrix3x4<Byte> Magnum::Matrix3x4b new in 2020.06

Signed byte matrix with 3 columns and 4 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix4x2<Byte> Magnum::Matrix4x2b new in 2020.06

Signed byte matrix with 4 columns and 2 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix4x4b and ignore the bottom two rows.

typedef Math::Matrix4x3<Byte> Magnum::Matrix4x3b new in 2020.06

Signed byte matrix with 4 columns and 3 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix4x4b and ignore the bottom row.

typedef Math::Matrix4x4<Byte> Magnum::Matrix4x4b new in 2020.06

Signed byte matrix with 4 columns and 4 rows.

Storage only, in ordet to support matrices packed into 8-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix2x2<Short> Magnum::Matrix2x2s new in 2020.06

Signed short matrix with 2 columns and 2 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix2x3<Short> Magnum::Matrix2x3s new in 2020.06

Signed short matrix with 2 columns and 3 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix2x4s and ignore the bottom row.

typedef Math::Matrix2x4<Short> Magnum::Matrix2x4s new in 2020.06

Signed short matrix with 2 columns and 4 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix3x2<Short> Magnum::Matrix3x2s new in 2020.06

Signed short matrix with 3 columns and 2 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix3x3<Short> Magnum::Matrix3x3s new in 2020.06

Signed short matrix with 3 columns and 3 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix3x4s and ignore the bottom row.

typedef Math::Matrix3x4<Short> Magnum::Matrix3x4s new in 2020.06

Signed short matrix with 3 columns and 4 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix4x2<Short> Magnum::Matrix4x2s new in 2020.06

Signed short matrix with 4 columns and 2 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::Matrix4x3<Short> Magnum::Matrix4x3s new in 2020.06

Signed short matrix with 4 columns and 3 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix4x4s and ignore the bottom row.

typedef Math::Matrix4x4<Short> Magnum::Matrix4x4s new in 2020.06

Signed short matrix with 4 columns and 4 rows.

Storage only, in ordet to support matrices packed into 16-bit types. For performing arithmetic on this type use Math::unpack() / Math::unpackInto() to convert to a float type first and then Math::pack() / Math::packInto() back again.

typedef Math::QuadraticBezier2D<Float> Magnum::QuadraticBezier2D

Float two-dimensional quadratic Bézier curve.

typedef Math::QuadraticBezier3D<Float> Magnum::QuadraticBezier3D

Float three-dimensional quadratic Bézier curve.

typedef Math::CubicBezier2D<Float> Magnum::CubicBezier2D

Float two-dimensional cubic Bézier curve.

typedef Math::CubicBezier3D<Float> Magnum::CubicBezier3D

Float three-dimensional cubic Bézier curve.

typedef Math::CubicHermite1D<Float> Magnum::CubicHermite1D

Float scalar cubic Hermite spline point.

typedef Math::CubicHermite2D<Float> Magnum::CubicHermite2D

Float two-dimensional cubic Hermite spline point.

typedef Math::CubicHermite3D<Float> Magnum::CubicHermite3D

Float three-dimensional cubic Hermite spline point.

typedef Math::CubicHermiteComplex<Float> Magnum::CubicHermiteComplex

Float cubic Hermite spline complex number.

typedef Math::CubicHermiteQuaternion<Float> Magnum::CubicHermiteQuaternion

Float cubic Hermite spline quaternion.

typedef Math::Complex<Float> Magnum::Complex

Float complex number.

typedef Math::DualComplex<Float> Magnum::DualComplex

Float dual complex number.

typedef Math::Quaternion<Float> Magnum::Quaternion

Float quaternion.

typedef Math::DualQuaternion<Float> Magnum::DualQuaternion

Float dual quaternion.

typedef Math::Constants<Float> Magnum::Constants

Float constants.

typedef Math::Deg<Float> Magnum::Deg

Angle in float degrees.

typedef Math::Rad<Float> Magnum::Rad

Angle in float radians.

typedef Math::Range1D<Float> Magnum::Range1D

One-dimensional float range.

typedef Math::Range2D<Float> Magnum::Range2D

Two-dimensional float range.

typedef Math::Range3D<Float> Magnum::Range3D

Three-dimensional float range.

typedef Math::Range1D<UnsignedInt> Magnum::Range1Dui new in Git master

One-dimensional unsigned integer range.

typedef Math::Range2D<UnsignedInt> Magnum::Range2Dui new in Git master

Two-dimensional unsigned integer range.

typedef Math::Range3D<UnsignedInt> Magnum::Range3Dui new in Git master

Three-dimensional unsigned integer range.

typedef Math::Range1D<Int> Magnum::Range1Di

One-dimensional signed integer range.

typedef Math::Range2D<Int> Magnum::Range2Di

Two-dimensional signed integer range.

typedef Math::Range3D<Int> Magnum::Range3Di

Three-dimensional signed integer range.

typedef Math::Frustum<Float> Magnum::Frustum

Float frustum.

typedef Math::Nanoseconds<Long> Magnum::Nanoseconds new in Git master

64-bit signed integer nanoseconds

typedef Math::Seconds<Float> Magnum::Seconds new in Git master

32-bit float seconds

typedef Math::Vector2<Half> Magnum::Vector2h new in 2020.06

Two-component half-float vector.

typedef Math::Vector3<Half> Magnum::Vector3h new in 2020.06

Three-component half-float vector.

typedef Math::Vector4<Half> Magnum::Vector4h new in 2020.06

Four-component half-float vector.

typedef Math::Color3<Half> Magnum::Color3h new in 2020.06

Three-component (RGB) half-float color.

typedef Math::Color4<Half> Magnum::Color4h new in 2020.06

Four-component (RGBA) half-float color.

typedef Math::Matrix2x2<Half> Magnum::Matrix2x2h new in 2020.06

Half-float matrix with 2 columns and 2 rows.

typedef Math::Matrix2x3<Half> Magnum::Matrix2x3h new in 2020.06

Half-float matrix with 2 columns and 3 rows.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix2x4h and ignore the bottom row.

typedef Math::Matrix2x4<Half> Magnum::Matrix2x4h new in 2020.06

Half-float matrix with 2 columns and 4 rows.

typedef Math::Matrix3x2<Half> Magnum::Matrix3x2h new in 2020.06

Half-float matrix with 3 columns and 2 rows.

typedef Math::Matrix3x3<Half> Magnum::Matrix3x3h new in 2020.06

Half-float matrix with 3 columns and 3 rows.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix3x4h and ignore the bottom row.

typedef Math::Matrix3x4<Half> Magnum::Matrix3x4h new in 2020.06

Half-float matrix with 3 columns and 4 rows.

typedef Math::Matrix4x2<Half> Magnum::Matrix4x2h new in 2020.06

Half-float matrix with 4 columns and 2 rows.

typedef Math::Matrix4x3<Half> Magnum::Matrix4x3h new in 2020.06

Half-float matrix with 4 columns and 3 rows.

Note that this type doesn't have the columns four-byte aligned, which may negatively affect performance in some cases. For better alignment use Matrix4x4h and ignore the bottom row.

typedef Math::Matrix4x4<Half> Magnum::Matrix4x4h new in 2020.06

Half-float matrix with 4 columns and 4 rows.

typedef Math::Deg<Half> Magnum::Degh new in Git master

Angle in half-float degrees.

typedef Math::Rad<Half> Magnum::Radh new in Git master

Angle in half-float radians.

typedef Math::Range1D<Half> Magnum::Range1Dh new in Git master

One-dimensional half-float range.

typedef Math::Range2D<Half> Magnum::Range2Dh new in Git master

Two-dimensional half-float range.

typedef Math::Range3D<Half> Magnum::Range3Dh new in Git master

Three-dimensional half-float range.

typedef double Magnum::Double

Double (64bit)

Equivalent to GLSL double.

typedef Math::Vector2<Double> Magnum::Vector2d

Two-component double vector.

Equivalent to GLSL dvec2.

typedef Math::Vector3<Double> Magnum::Vector3d

Three-component double vector.

Equivalent to GLSL dvec3.

typedef Math::Vector4<Double> Magnum::Vector4d

Four-component double vector.

Equivalent to GLSL dvec4.

typedef Math::Matrix3<Double> Magnum::Matrix3d

3x3 double transformation matrix

Equivalent to GLSL dmat3.

typedef Math::Matrix4<Double> Magnum::Matrix4d

4x4 double transformation matrix

Equivalent to GLSL dmat4.

typedef Math::Matrix2x2<Double> Magnum::Matrix2x2d

2x2 double matrix

Equivalent to GLSL dmat2x2.

typedef Math::Matrix3x3<Double> Magnum::Matrix3x3d

3x3 double matrix

Equivalent to GLSL dmat3x3. Note that this is different from Matrix3d, which contains additional functions for transformations in 2D.

typedef Math::Matrix4x4<Double> Magnum::Matrix4x4d

4x4 double matrix

Equivalent to GLSL dmat4x4. Note that this is different from Matrix4d, which contains additional functions for transformations in 3D.

typedef Math::Matrix2x3<Double> Magnum::Matrix2x3d

Double matrix with 2 columns and 3 rows.

Equivalent to GLSL dmat2x3.

typedef Math::Matrix3x2<Double> Magnum::Matrix3x2d

Double matrix with 3 columns and 2 rows.

Equivalent to GLSL dmat3x2.

typedef Math::Matrix2x4<Double> Magnum::Matrix2x4d

Double matrix with 2 columns and 4 rows.

Equivalent to GLSL dmat2x4.

typedef Math::Matrix4x2<Double> Magnum::Matrix4x2d

Double matrix with 4 columns and 2 rows.

Equivalent to GLSL dmat4x2.

typedef Math::Matrix3x4<Double> Magnum::Matrix3x4d

Double matrix with 3 columns and 4 rows.

Equivalent to GLSL dmat3x4.

typedef Math::Matrix4x3<Double> Magnum::Matrix4x3d

Double matrix with 4 columns and 3 rows.

Equivalent to GLSL dmat4x3.

typedef Math::QuadraticBezier2D<Double> Magnum::QuadraticBezier2Dd

Double two-dimensional quadratic Bézier curve.

typedef Math::QuadraticBezier3D<Double> Magnum::QuadraticBezier3Dd

Double three-dimensional quadratic Bézier curve.

typedef Math::CubicBezier2D<Double> Magnum::CubicBezier2Dd

Double two-dimensional cubic Bézier curve.

typedef Math::CubicBezier3D<Double> Magnum::CubicBezier3Dd

Double three-dimensional cubic Bézier curve.

typedef Math::CubicHermite1D<Double> Magnum::CubicHermite1Dd

Double scalar cubic Hermite spline point.

typedef Math::CubicHermite2D<Double> Magnum::CubicHermite2Dd

Double two-dimensional cubic Hermite spline point.

typedef Math::CubicHermite3D<Double> Magnum::CubicHermite3Dd

Double three-dimensional cubic Hermite spline point.

typedef Math::CubicHermiteComplex<Double> Magnum::CubicHermiteComplexd

Double cubic Hermite spline complex number.

typedef Math::CubicHermiteQuaternion<Double> Magnum::CubicHermiteQuaterniond

Double cubic Hermite spline quaternion.

typedef Math::Complex<Double> Magnum::Complexd

Double complex number.

typedef Math::DualComplex<Double> Magnum::DualComplexd

Double dual complex number.

typedef Math::Quaternion<Double> Magnum::Quaterniond

Double quaternion.

typedef Math::DualQuaternion<Double> Magnum::DualQuaterniond

Double dual quaternion.

typedef Math::Constants<Double> Magnum::Constantsd

Double constants.

typedef Math::Deg<Double> Magnum::Degd

Angle in double degrees.

typedef Math::Rad<Double> Magnum::Radd

Angle in double radians.

typedef Math::Range1D<Double> Magnum::Range1Dd

One-dimensional double range.

typedef Math::Range2D<Double> Magnum::Range2Dd

Two-dimensional double range.

typedef Math::Range3D<Double> Magnum::Range3Dd

Three-dimensional double range.

typedef Math::Frustum<Double> Magnum::Frustumd

Double frustum.

Function documentation

template<UnsignedInt dimensions, class T>
Debug& Magnum::operator<<(Debug& debug, const Array<dimensions, T>& value)

Debug output operator.

template<class T>
Debug& Magnum::operator<<(Debug& debug, const Array1D<T>& value)

Debug output operator.

template<class T>
Debug& Magnum::operator<<(Debug& debug, const Array2D<T>& value)

Debug output operator.

template<class T>
Debug& Magnum::operator<<(Debug& debug, const Array3D<T>& value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, InputFileCallbackPolicy value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, ImageFlag1D value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, ImageFlag2D value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, ImageFlag3D value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, ImageFlags1D value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, ImageFlags2D value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, ImageFlags3D value)

Debug output operator.

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

Debug output operator.

bool Magnum::isMeshPrimitiveImplementationSpecific(MeshPrimitive primitive) constexpr new in 2020.06

Whether a MeshPrimitive value wraps an implementation-specific identifier.

Returns true if value of primitive has its highest bit set, false otherwise. Use meshPrimitiveWrap() and meshPrimitiveUnwrap() to wrap/unwrap an implementation-specific indentifier to/from MeshPrimitive.

template<class T>
MeshPrimitive Magnum::meshPrimitiveWrap(T implementationSpecific) constexpr new in 2020.06

Wrap an implementation-specific mesh primitive identifier in MeshPrimitive.

Sets the highest bit on implementationSpecific to mark it as implementation-specific. Expects that implementationSpecific fits into the remaining 31 bits. Use meshPrimitiveUnwrap() for the inverse operation.

template<class T = UnsignedInt>
T Magnum::meshPrimitiveUnwrap(MeshPrimitive primitive) constexpr new in 2020.06

Unwrap an implementation-specific mesh primitive identifier from MeshPrimitive.

Unsets the highest bit from primitive to extract the implementation-specific value. Expects that primitive has it set. Use meshPrimitiveWrap() for the inverse operation.

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

Debug output operator.

bool Magnum::isMeshIndexTypeImplementationSpecific(MeshIndexType type) constexpr new in Git master

Whether a MeshIndexType value wraps an implementation-specific identifier.

Returns true if value of type has its highest bit set, false otherwise. Use meshIndexTypeWrap() and meshIndexTypeUnwrap() to wrap/unwrap an implementation-specific indentifier to/from MeshIndexType.

template<class T>
MeshIndexType Magnum::meshIndexTypeWrap(T implementationSpecific) constexpr new in Git master

Wrap an implementation-specific mesh index type identifier in MeshIndexType.

Sets the highest bit on implementationSpecific to mark it as implementation-specific. Expects that implementationSpecific fits into the remaining 31 bits. Use meshIndexTypeUnwrap() for the inverse operation.

template<class T = UnsignedInt>
T Magnum::meshIndexTypeUnwrap(MeshIndexType type) constexpr new in Git master

Unwrap an implementation-specific mesh index type identifier from MeshIndexType.

Unsets the highest bit from type to extract the implementation-specific value. Expects that type has it set. Use meshIndexTypeWrap() for the inverse operation.

UnsignedInt Magnum::meshIndexTypeSize(MeshIndexType type)

Size of given mesh index type.

UnsignedInt Magnum::pixelFormatSize(PixelFormat format) new in Git master

Size of given pixel format.

Expects that the pixel format is not implementation-specific.

PixelFormat Magnum::pixelFormatChannelFormat(PixelFormat format) new in Git master

Channel format of given pixel format.

Returns for example PixelFormat::R8Srgb for PixelFormat::RGB8Srgb or PixelFormat::R16F for PixelFormat::RG16F. Calling pixelFormatChannelCount() on the returned value will always give 1. Expects that the pixel format is not implementation-specific and not a depth/stencil format.

UnsignedInt Magnum::pixelFormatChannelCount(PixelFormat format) new in Git master

Channel count of given pixel format.

Returns for example 1 for PixelFormat::R8Unorm or 3 for PixelFormat::RGB32F. Expects that the pixel format is not implementation-specific and not a depth/stencil format.

bool Magnum::isPixelFormatNormalized(PixelFormat format) new in Git master

Whether given pixel format is normalized.

Returns true for *Unorm, *Snorm and *Srgb formats, false otherwise. In particular, floating-point formats are not treated as normalized, even though for example they might commonly have values only in the $ [0.0, 1.0] $ range (or in the $ [-1.0, 1.0] $ signed range). Expects that the pixel format is not implementation-specific and not a depth/stencil format.

For any pixel format, exactly one of isPixelFormatNormalized(), isPixelFormatIntegral() and isPixelFormatFloatingPoint() returns true.

bool Magnum::isPixelFormatIntegral(PixelFormat format) new in Git master

Whether given pixel format is integral.

Returns true for *UI and *I formats, false otherwise. In particular, normalized integer formats are not treated as integer. Expects that the pixel format is not implementation-specific and not a depth/stencil format.

For any pixel format, exactly one of isPixelFormatNormalized(), isPixelFormatIntegral() and isPixelFormatFloatingPoint() returns true.

bool Magnum::isPixelFormatFloatingPoint(PixelFormat format) new in Git master

Whether given pixel format is floating-point.

Returns true for *F formats, false otherwise. In particular, normalized integer formats are not treated as floating-point, even though they get expanded to the $ [0.0, 1.0] $ or $ [-1.0, 1.0] $ floating-point range in shaders. Expects that the pixel format is not implementation-specific and not a depth/stencil format.

For any pixel format, exactly one of isPixelFormatNormalized(), isPixelFormatIntegral() and isPixelFormatFloatingPoint() returns true.

bool Magnum::isPixelFormatSrgb(PixelFormat format) new in Git master

Whether given pixel format is sRGB.

Returns true for *Srgb formats, false otherwise. If this function returns true, isPixelFormatNormalized() also returns true. Expects that the pixel format is not implementation-specific and not a depth/stencil format.

bool Magnum::isPixelFormatDepthOrStencil(PixelFormat format) new in Git master

Whether given pixel format is depth or stenil.

Returns true for Depth*, Stencil* and combined depth/stencil formats, false otherwise. Expects that the pixel format is not implementation-specific.

PixelFormat Magnum::pixelFormat(PixelFormat format, UnsignedInt channelCount, bool srgb) new in Git master

Assemble a pixel format from parts.

Converts format to a new format with desired channel count and normalization. Expects that the pixel format is not implementation-specific and not a depth/stencil format, channelCount is 1, 2, 3 or 4 and srgb is true only for 8-bit integer formats.

Example usage — picking a three or four-channel format corresponding to a grayscale or grayscale + alpha format:

PixelFormat grayscaleFormat = ;

PixelFormat rgbFormat = pixelFormat(
    grayscaleFormat,
    pixelFormatChannelCount(grayscaleFormat) == 2 ? 4 : 3,
    isPixelFormatSrgb(grayscaleFormat));

UnsignedInt Magnum::pixelSize(PixelFormat format)

Size of given pixel format.

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

Debug output operator.

bool Magnum::isPixelFormatImplementationSpecific(PixelFormat format) constexpr

Whether a PixelFormat value wraps an implementation-specific identifier.

Returns true if value of format has its highest bit set, false otherwise. Use pixelFormatWrap() and pixelFormatUnwrap() to wrap/unwrap an implementation-specific indentifier to/from PixelFormat.

template<class T>
PixelFormat Magnum::pixelFormatWrap(T implementationSpecific) constexpr

Wrap an implementation-specific pixel format identifier in PixelFormat.

Sets the highest bit on implementationSpecific to mark it as implementation-specific. Expects that implementationSpecific fits into the remaining 31 bits. Use pixelFormatUnwrap() for the inverse operation.

template<class T = UnsignedInt>
T Magnum::pixelFormatUnwrap(PixelFormat format) constexpr

Unwrap an implementation-specific pixel format identifier from PixelFormat.

Unsets the highest bit from format to extract the implementation-specific value. Expects that format has it set. Use pixelFormatWrap() for the inverse operation.

Vector3i Magnum::compressedPixelFormatBlockSize(CompressedPixelFormat format) new in Git master

Block size of given compressed pixel format.

For 2D formats the Z dimension is always 1. Expects that the pixel format is not implementation-specific.

Vector3i Magnum::compressedBlockSize(CompressedPixelFormat format)

Block size of given compressed pixel format.

UnsignedInt Magnum::compressedPixelFormatBlockDataSize(CompressedPixelFormat format) new in Git master

Block data size of given compressed pixel format.

Byte size of each compressed block. Expects that the pixel format is not implementation-specific.

UnsignedInt Magnum::compressedBlockDataSize(CompressedPixelFormat format)

Block data size of given compressed pixel format.

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

Debug output operator.

bool Magnum::isCompressedPixelFormatImplementationSpecific(CompressedPixelFormat format) constexpr

Whether a CompressedPixelFormat value wraps an implementation-specific identifier.

Returns true if value of format has its highest bit set, false otherwise. Use compressedPixelFormatWrap() and compressedPixelFormatUnwrap() to wrap/unwrap an implementation-specific indentifier to/from CompressedPixelFormat.

template<class T>
CompressedPixelFormat Magnum::compressedPixelFormatWrap(T implementationSpecific) constexpr

Wrap an implementation-specific pixel format identifier in a CompressedPixelFormat.

Sets the highest bit on implementationSpecific to mark it as implementation-specific. Expects that implementationSpecific fits into the remaining 31 bits. Use compressedPixelFormatUnwrap() for the inverse operation.

template<class T = UnsignedInt>
T Magnum::compressedPixelFormatUnwrap(CompressedPixelFormat format) constexpr

Unwrap an implementation-specific pixel format identifier from a CompressedPixelFormat.

Unsets the highest bit from format to extract the implementation-specific value. Expects that format has it set. Use compressedPixelFormatWrap() for the inverse operation.

Debug& Magnum::operator<<(Debug& debug, ResourceState value)

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, const ResourceKey& value)

Debug output operator.

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

Debug output operator.

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

Debug output operator.

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

Debug output operator.

Debug& Magnum::operator<<(Debug& debug, VertexFormat value) new in 2020.06

Debug output operator.

bool Magnum::isVertexFormatImplementationSpecific(VertexFormat format) constexpr new in 2020.06

Whether a VertexFormat value wraps an implementation-specific identifier.

Returns true if value of format has its highest bit set, false otherwise. Use vertexFormatWrap() and vertexFormatUnwrap() to wrap/unwrap an implementation-specific indentifier to/from VertexFormat.

template<class T>
VertexFormat Magnum::vertexFormatWrap(T implementationSpecific) constexpr new in 2020.06

Wrap an implementation-specific vertex format identifier in VertexFormat.

Sets the highest bit on implementationSpecific to mark it as implementation-specific. Expects that implementationSpecific fits into the remaining 31 bits. Use vertexFormatUnwrap() for the inverse operation.

template<class T = UnsignedInt>
T Magnum::vertexFormatUnwrap(VertexFormat format) constexpr new in 2020.06

Unwrap an implementation-specific vertex format identifier from VertexFormat.

Unsets the highest bit from format to extract the implementation-specific value. Expects that format has it set. Use vertexFormatWrap() for the inverse operation.

UnsignedInt Magnum::vertexFormatSize(VertexFormat format) new in 2020.06

Size of given vertex format.

To get size of a single component, call this function on a result of vertexFormatComponentFormat(). Expects that the vertex format is not implementation-specific.

VertexFormat Magnum::vertexFormatComponentFormat(VertexFormat format) new in 2020.06

Component format of given vertex format.

The function also removes the normalization aspect from the format — use isVertexFormatNormalized() to query that. Returns for example VertexFormat::Short for VertexFormat::ShortNormalized or VertexFormat::UnsignedByte for VertexFormat::Vector3ub. Calling vertexFormatComponentCount() on the returned value will always give 1; calling isVertexFormatNormalized() on the returned value will always give false. Expects that the vertex format is not implementation-specific.

UnsignedInt Magnum::vertexFormatComponentCount(VertexFormat format) new in 2020.06

Component count of given vertex format.

Returns 1 for scalar formats and e.g. 3 for VertexFormat::Vector3ub. Expects that the vertex format is not implementation-specific.

UnsignedInt Magnum::vertexFormatVectorCount(VertexFormat format) new in 2020.06

Vector count of given vertex format.

Returns 1 for scalar and vector formats and e.g. 3 for VertexFormat::Matrix3x2d. Expects that the vertex format is not implementation-specific.

UnsignedInt Magnum::vertexFormatVectorStride(VertexFormat format) new in 2020.06

Vector stride of given vertex format.

Returns type size for scalar and vector formats and e.g. 8 for VertexFormat::Matrix2x3hAligned (but 6 for VertexFormat::Matrix2x3h). Expects that the vertex format is not implementation-specific.

bool Magnum::isVertexFormatNormalized(VertexFormat format) new in 2020.06

Whether given vertex format is normalized.

Returns true for *Normalized formats, false otherwise. In particular, floating-point formats are not treated as normalized, even though for example colors might commonly have values only in the $ [0.0, 1.0] $ range (or normals in the $ [-1.0, 1.0] $ range). Expects that the vertex format is not implementation-specific.

VertexFormat Magnum::vertexFormat(VertexFormat format, UnsignedInt componentCount, bool normalized) new in 2020.06

Assemble a vertex format from parts.

Converts format to a new format of desired component count and normalization. Expects that componentCount is 1, 2, 3 or 4 and normalized is true only for 8- and 16-bit integer formats. Expects that the vertex format is not implementation-specific.

Example usage — picking a format for four-component tangents to match an existing (three-component) vertex normal format:

VertexFormat normalFormat = ;

VertexFormat tangentFormat = vertexFormat(
    normalFormat,
    4,
    isVertexFormatNormalized(normalFormat));

VertexFormat Magnum::vertexFormat(VertexFormat format, UnsignedInt vectorCount, UnsignedInt componentCount, bool aligned) new in 2020.06

Assemble a matrix vertex format from parts.

Converts format to a new format of desired component and vertex count and normalization. Expects that both vectorCount and componentCount is either 2, 3 or 4, and format is floating-point or 8-/16-bit signed integer. Expects that the vertex format is not implementation-specific.

Variable documentation

DefaultInitT Magnum::DefaultInit constexpr new in Git master

Default initialization tag.

Use for construction with default initialization. The actual meaning of "default" may vary, see documentation of a particular API using this tag for a detailed behavior description.

NoInitT Magnum::NoInit constexpr new in 2020.06

No initialization tag.

Use for construction with no initialization at all.

NoCreateT Magnum::NoCreate constexpr

No creation tag.

Use for construction without creating the underlying OpenGL / Vulkan / ... object. Note that calling anything on objects created this way is not defined (and not checked or guarded in any way) and may result in crashes. If you want delayed object creation with safety checks (however with some extra memory overhead), wrap the objects in an Corrade::Containers::Optional.

NoAllocateT Magnum::NoAllocate constexpr new in Git master

No allocation tag.

Use for construction without allocating memory.