The Open  GL Math Library
1 Core features
1.1 Vector types
1.1.1 Vector types with precision qualifiers
1.2 Matrix types
1.2.1 Matrix types with precision qualifiers
2 Stable extensions
3 Recommended extensions
7.4

The OpenGL Math Library

Eric Griffis <dedbox@gmail.com>

OpenGL Mathematics (GLM)

glm.g-truc.net

 (require glm) package: glm

1 Core features

Features that implement in Racket the GLSL specification as closely as possible.

The GLM core consists of C Types that mirror GLSL types and Racket functions that mirror the GLSL functions.

The best documentation for the GLM Core is the current GLSL specification, version 4.2.

To use the GLM core, require glm.

1.1 Vector types

Vector types of two to four components with an exhaustive set of operators.

1.1.1 Vector types with precision qualifiers

Vector types with precision qualifiers which may result in various precision in terms of ULPs.

GLSL allows defining qualifiers for particular variables. With OpenGL’s GLSL, these qualifiers have no effect; they are for compatibility. With OpenGL ES’s GLSL, these qualifiers do have an effect.

1.2 Matrix types

Matrix types with C columns and R rows where C and R are values between 2 to 4 included. These types have exhauseive sets of operators.

1.2.1 Matrix types with precision qualifiers

Matrix types with precision qualifiers which may result in various precision in term of ULPs.

GLSL allows defining qualifiers for particular variables. With OpenGL’s GLSL, these qualifiers have no effect; they are for compatibility. With OpenGL ES’s GLSL, these qualifiers do have an effect.

2 Stable extensions

Additional features not specified by GLSL specification.

EXT extensions are fully tested and documented.

Even if it’s highly unrecommended, it’s possible to include all the extensions at once by importing glm/ext. Otherwise, each extension needs to be imported from a specific module.

3 Recommended extensions

Additional features not specified by GLSL specification.

GTC extensions aim to be stable with tests and documentation.

Even if it’s highly unrecommended, it’s possible to include all the extensions at once by importing glm/ext. Otherwise, each extension needs to be imported from a specific module.