diff --git a/manual.md b/manual.md index cd9a56be..1c749d93 100644 --- a/manual.md +++ b/manual.md @@ -217,7 +217,7 @@ GLM does not depend on external libraries or headers such as ``, [` void foo() { - glm::vec4 ColorRGBA(1.0f, 0.5f, 0.0f, 1.0f); - glm::vec3 ColorBGR = ColorRGBA.bgr(); + glm::vec4 ColorRGBA(1.0f, 0.5f, 0.0f, 1.0f); + glm::vec3 ColorBGR = ColorRGBA.bgr(); - glm::vec3 PositionA(1.0f, 0.5f, 0.0f, 1.0f); - glm::vec3 PositionB = PositionXYZ.xyz() * 2.0f; + glm::vec3 PositionA(1.0f, 0.5f, 0.0f, 1.0f); + glm::vec3 PositionB = PositionXYZ.xyz() * 2.0f; - glm::vec2 TexcoordST(1.0f, 0.5f); - glm::vec4 TexcoordSTPQ = TexcoordST.stst(); + glm::vec2 TexcoordST(1.0f, 0.5f); + glm::vec4 TexcoordSTPQ = TexcoordST.stst(); } ``` @@ -256,7 +256,7 @@ Swizzle operators return a **copy** of the component values, and thus *can't* be ```cpp -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include void foo() @@ -271,10 +271,10 @@ void foo() ### 2.2. Anonymous union member implementation -Visual C++ supports, as a _non-standard language extension_, anonymous `struct`s as `union` members. This permits a powerful swizzling implementation that both allows L-value swizzle expressions and GLSL-like syntax. To use this feature, the language extension must be enabled by a supporting compiler and `GLM_SWIZZLE` must be `#define`d. +Visual C++ supports, as a _non-standard language extension_, anonymous `struct`s as `union` members. This permits a powerful swizzling implementation that both allows L-value swizzle expressions and GLSL-like syntax. To use this feature, the language extension must be enabled by a supporting compiler and `GLM_FORCE_SWIZZLE` must be `#define`d. ```cpp -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include // Only guaranteed to work with Visual C++! @@ -297,7 +297,7 @@ void foo() This version returns implementation-specific objects that _implicitly convert_ to their respective vector types. As a consequence of this design, these extra types **can't be directly used** by GLM functions; they must be converted through constructors or `operator()`. ```cpp -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include using glm::vec4;