diff --git a/doc/src/data.xml b/doc/src/data.xml index be18d318..f67420eb 100644 --- a/doc/src/data.xml +++ b/doc/src/data.xml @@ -170,10 +170,14 @@ - + - GLM 0.9.3.0 is finally released. Since the branch 0.9.2, the test bench and the Doxygen API documentation has been expend. + GLM 0.9.3.0 is finally released. Since the branch 0.9.2, the test bench and the Doxygen API documentation has been expended significantly leading to an even more reliable implementation and hopefully an even smoother development experience. + + From the many improvements, it is worth to acknowledge the addition of the core noise functions as defined by GLSL. The implementation is based on the promoted GLM_GTC_noise features which implement a perlin noise, periodic perlin noise and a simplex noise. The random number generation functions (GLM_GTC_random) which provides various interesting distributions as illustrated below. Reaching GLM tool box, the new experimental extension GLM_GTX_constants provides a set of constant. + + Swizzle operators are a challenging task to implement but thanks to the effort of many contributors, GLM 0.9.3.0 provides finally something interesting even if not perfect but still a great improvement considering the incompatibilities with some external libraries. GLM 0.9.3 provides two implemetanations, one for C++ 98 @@ -207,13 +211,13 @@ glm::vec4 b = glm::vec4(0, 2, 0, 0); - glm::vec3 c = (a.zyx() + b.xyz()) * 0.5f; + glm::vec3 c = vec4((a.zyx() + b.xyz()).xyz() * 0.5f, 1.0f); glm::vec2 d = glm::normalize(glm::vec2(c.yz())); - a.xyzw = d.xyxy; + a.xyzw() = d.xyxy(); } @@ -235,7 +239,7 @@ - void example_cpp98() + void example_cpp11() { @@ -246,12 +250,19 @@ glm::vec4 b = glm::vec4(0, 2, 0, 0); + // To use a swizzle operator with an operator, it needs to be cast into a vector either explicitly or with the operator () - glm::vec3 c = (a.zyx() + b.xyz()) * 0.5f; + glm::vec4 c = glm::vec4((a.zyx() + b.xyz()).xyz * 0.5f, 1.0f); - glm::vec2 d = glm::normalize(glm::vec2(c.yz())); + // Before being pasted to a function, a swizzle operator needs to be cast into a vector either explicitly or with the operator () + + + glm::vec2 d = glm::normalize(glm::vec2(c.yz)); + + // glm::vec2 d = glm::normalize(c.yz()); // Equivalent code + a.xyzw = d.xyxy; diff --git a/readme.txt b/readme.txt index 59673e20..fe86d725 100644 --- a/readme.txt +++ b/readme.txt @@ -37,7 +37,7 @@ More informations in GLM manual: http://glm.g-truc.net/glm-0.9.3.pdf ================================================================================ -GLM 0.9.3.0: 2012-01-08 +GLM 0.9.3.0: 2012-01-09 -------------------------------------------------------------------------------- - Added CPP Check project - Fixed conflict with Windows headers