tower120
tower120

Reputation: 5255

glm precision qualifier

What actually "precision qualifier" do, in the glm library?

P.S. At first I thought that it switch between float/double/long double... But than I found d -version of mat4 dmat4 (with double type).

P.P.S. I use it in C++ code.

Upvotes: 3

Views: 1914

Answers (1)

Iggy
Iggy

Reputation: 4888

From: http://glm.g-truc.net/0.9.1/api/a00229.html

The GLSL language allows the user to define the precision of a particular variable. In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility with OpenGL ES's precision qualifiers, where they do have an effect.

C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: a number of typedefs of the Template types that use a particular precision.

None of these types make any guarantees about the actual precision used.

Upvotes: 1

Related Questions