Welcome to Python-flavored Magnum! Please note that, while already being rather stable, this functionality is still considered experimental and some APIs might get changed without preserving full backwards compatibility.

magnum module

Root Magnum module

Contents

Modules

module math
Math library
module gl
OpenGL wrapping layer
module meshtools
Mesh tools
module platform
Platform-specific application and context creation
module primitives
Primitive library
module shaders
Builtin shaders
module scenegraph
Scene graph library
module trade
Data format exchange

Classes

class Deg
Degrees
class Rad
Radians
class BoolVector2
Two-component bool vector
class BoolVector3
Three-component bool vector
class BoolVector4
Four-component bool vector
class Vector2
Two-component float vector
class Vector3
Threee-component float vector
class Vector4
Four-component float vector
class Vector2d
Two-component double vector
class Vector3d
Threee-component double vector
class Vector4d
Four-component double vector
class Vector2i
Two-component signed integer vector
class Vector3i
Threee-component signed integral vector
class Vector4i
Four-component signed integral vector
class Vector2ui
Two-component unsigned integral vector
class Vector3ui
Threee-component unsigned integral vector
class Vector4ui
Four-component unsigned integral vector
class Color3
Color in linear RGB color space
class Color4
Color in linear RGBA color space
class Matrix2x2
2x2 float matrix
class Matrix2x3
2x3 float matrix
class Matrix2x4
2x4 float matrix
class Matrix3x2
3x2 float matrix
class Matrix3x3
3x3 float matrix
class Matrix3x4
3x4 float matrix
class Matrix4x2
4x2 float matrix
class Matrix4x3
4x3 float matrix
class Matrix4x4
4x4 float matrix
class Matrix2x2d
2x2 double matrix
class Matrix2x3d
2x3 double matrix
class Matrix2x4d
2x4 double matrix
class Matrix3x2d
3x2 double matrix
class Matrix3x3d
3x3 double matrix
class Matrix3x4d
3x4 double matrix
class Matrix4x2d
4x2 double matrix
class Matrix4x3d
4x3 double matrix
class Matrix4x4d
4x4 double matrix
class Matrix3
2D float transformation matrix
class Matrix4
3D float transformation matrix
class Matrix3d
2D double transformation matrix
class Matrix4d
3D double transformation matrix
class Quaternion
Float quaternion
class Quaterniond
Double quaternion
class Range1D
One-dimensional float range
class Range1Di
One-dimensional float range
class Range1Dd
One-dimensional double range
class Range2D
Two-dimensional float range
class Range2Di
Two-dimensional float range
class Range2Dd
Two-dimensional double range
class Range3D
Three-dimensional float range
class Range3Di
Three-dimensional float range
class Range3Dd
Three-dimensional double range
class PixelStorage
Pixel storage parameters
class Image1D
One-dimensional image
class Image2D
Two-dimensional image
class Image3D
Three-dimensional image
class ImageView1D
One-dimensional image view
class ImageView2D
Two-dimensional image view
class ImageView3D
Three-dimensional image view
class MutableImageView1D
One-dimensional mutable image view
class MutableImageView2D
Two-dimensional mutable image view
class MutableImageView3D
Three-dimensional mutable image view

Enums

class MeshPrimitive: POINTS = 0 LINES = 1 LINE_LOOP = 2 LINE_STRIP = 3 TRIANGLES = 4 TRIANGLE_STRIP = 5 TRIANGLE_FAN = 6
Mesh primitive type
class MeshIndexType: UNSIGNED_BYTE = 0 UNSIGNED_SHORT = 1 UNSIGNED_INT = 2
Mesh index type
class PixelFormat: R8_UNORM = 1 RG8_UNORM = 2 RGB8_UNORM = 3 RGBA8_UNORM = 4 R8_SNORM = 5 RG8_SNORM = 6 RGB8_SNORM = 7 RGBA8_SNORM = 8 R8_SRGB = 9 RG8_SRGB = 10 RGB8_SRGB = 11 RGBA8_SRGB = 12 R8UI = 13 RG8UI = 14 RGB8UI = 15 RGBA8UI = 16 R8I = 17 RG8I = 18 RGB8I = 19 RGBA8I = 20 R16_UNORM = 21 RG16_UNORM = 22 RGB16_UNORM = 23 RGBA16_UNORM = 24 R16_SNORM = 25 RG16_SNORM = 26 RGB16_SNORM = 27 RGBA16_SNORM = 28 R16UI = 29 RG16UI = 30 RGB16UI = 31 RGBA16UI = 32 R16I = 33 RG16I = 34 RGB16I = 35 RGBA16I = 36 R32UI = 37 RG32UI = 38 RGB32UI = 39 RGBA32UI = 40 R32I = 41 RG32I = 42 RGB32I = 43 RGBA32I = 44 R16F = 45 RG16F = 46 RGB16F = 47 RGBA16F = 48 R32F = 49 RG32F = 50 RGB32F = 51 RGBA32F = 52
Format of pixel data
class SamplerFilter: NEAREST = 0 LINEAR = 1
Texture sampler filtering
class SamplerMipmap: BASE = 0 NEAREST = 1 LINEAR = 2
Texture sampler mip level selection
class SamplerWrapping: REPEAT = 0 MIRRORED_REPEAT = 1 CLAMP_TO_EDGE = 2 CLAMP_TO_BORDER = 3 MIRROR_CLAMP_TO_EDGE = 4
Texture sampler wrapping

Data

BUILD_STATIC: bool
Static library build
TARGET_GL: bool
OpenGL interoperability
TARGET_GLES: bool
OpenGL ES target
TARGET_GLES2: bool
OpenGL ES 2.0 target
TARGET_WEBGL: bool
WebGL target
TARGET_VK: bool
Vulkan interoperability