C++ 11 introduced
initializer lists and uniform initialization syntax and GLM 0.9.5.0 tried to leverage this functionality but didn't get it quite right.
GLM 0.9.5.2 is fixing this.
Examples of usage with GLM:- #define GLM_FORCE_RADIANS
- #include <glm/vec4.hpp>
- #include <glm/mat4.hpp>
- #include <glm/gtc/quat.hpp>
- {
- ...
- glm::vec4 A{0, 1, 2, 3};
- glm::mat4 B{
- {0, 1, 2, 3},
- {4, 5, 6, 7},
- {8, 9, 10, 11},
- {12, 13, 14, 15}};
- std::vector<glm::mat4> C{
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}};
- std::vector<glm::mat4> D{
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}};
- std::vector<glm::mat4> E{
- {
- { 0, 1, 2, 3 },
- { 4, 5, 6, 7 },
- { 8, 9, 10, 11 },
- { 12, 13, 14, 15 }
- },
- {
- { 0, 1, 2, 3 },
- { 4, 5, 6, 7 },
- { 8, 9, 10, 11 },
- { 12, 13, 14, 15 }
- }};
- glm::quat F{0, 1, 2, 3};
- ...
- }
Changelog:- Fixed initializer list ambiguity (#159, #160)
- Fixed warnings with the Android NDK 9c
- Fixed non power of two matrix products
- Fixed mix function link error
- Fixed SSE code included in GLM tests on "pure" platforms
- Fixed undefined reference to fastInverseSqrt (#161)
- Fixed GLM_FORCE_RADIANS with <glm/ext.hpp> build error (#165)
- Fix dot product clamp range for vector angle functions. (#163)
- Tentative fix for strict aliasing warning in GCC 4.8.1 / Android NDK 9c (#152)
- Fixed GLM_GTC_constants description brief (#162)
GLM 0.9.5.2: (ZIP, 4.1 MB) (7Z, 2.7 MB) GLM 0.9.5 manualGLM 0.9.5 api documentationSubmit a bug report