From a5e720b0b1873b29bd6ba83fa3f3f434c1202a50 Mon Sep 17 00:00:00 2001 From: christophe Date: Thu, 21 Dec 2023 17:15:50 +0100 Subject: [PATCH] GLM bumps to version 1.0.0 --- CMakeLists.txt | 2 +- glm/detail/setup.hpp | 35 +++++++++++++++++++++-------------- readme.md | 2 +- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e4141d6d..c2fb5f3e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ set(GLM_VERSION_PATCH "${CMAKE_MATCH_1}") string(REGEX MATCH "#define[ ]+GLM_VERSION_REVISION[ ]+([0-9]+)" _ ${GLM_SETUP_FILE}) set(GLM_VERSION_REVISION "${CMAKE_MATCH_1}") -set(GLM_VERSION ${GLM_VERSION_MAJOR}.${GLM_VERSION_MINOR}.${GLM_VERSION_PATCH}.${GLM_VERSION_REVISION}) +set(GLM_VERSION ${GLM_VERSION_MAJOR}.${GLM_VERSION_MINOR}.${GLM_VERSION_PATCH}) project(glm VERSION ${GLM_VERSION} LANGUAGES CXX) message(STATUS "GLM: Version " ${GLM_VERSION}) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 8c1a13e72..e22c43c11 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -3,14 +3,28 @@ #include #include -#define GLM_VERSION_MAJOR 0 -#define GLM_VERSION_MINOR 9 -#define GLM_VERSION_PATCH 9 -#define GLM_VERSION_REVISION 9 -#define GLM_VERSION 999 -#define GLM_VERSION_MESSAGE "GLM: version 0.9.9.9" +#define GLM_VERSION_MAJOR 1 +#define GLM_VERSION_MINOR 0 +#define GLM_VERSION_PATCH 0 +#define GLM_VERSION_REVISION 0 // Deprecated +#define GLM_VERSION 1000 // Deprecated +#define GLM_VERSION_MESSAGE "GLM: version 1.0.0" -#define GLM_SETUP_INCLUDED GLM_VERSION +#define GLM_MAKE_API_VERSION(variant, major, minor, patch) \ + ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch))) + +#define GLM_VERSION_COMPLETE GLM_MAKE_API_VERSION(0, GLM_VERSION_MAJOR, GLM_VERSION_MINOR, GLM_VERSION_PATCH) + +#define GLM_SETUP_INCLUDED GLM_VERSION_COMPLETE + +#define GLM_GET_VERSION_VARIANT(version) ((uint32_t)(version) >> 29U) +#define GLM_GET_VERSION_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x7FU) +#define GLM_GET_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU) +#define GLM_GET_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) + +#if ((GLM_SETUP_INCLUDED != GLM_VERSION_COMPLETE) && !defined(GLM_FORCE_IGNORE_VERSION)) +# error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error." +#elif GLM_SETUP_INCLUDED == GLM_VERSION_COMPLETE /////////////////////////////////////////////////////////////////////////////////// // Active states @@ -929,13 +943,6 @@ namespace detail # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP #endif -/////////////////////////////////////////////////////////////////////////////////// -// Check inclusions of different versions of GLM - -#elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION)) -# error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error." -#elif GLM_SETUP_INCLUDED == GLM_VERSION - /////////////////////////////////////////////////////////////////////////////////// // Messages diff --git a/readme.md b/readme.md index c14b2e32b..00d933737 100644 --- a/readme.md +++ b/readme.md @@ -51,7 +51,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate) ## Release notes -### [GLM 0.9.9.9](https://github.com/g-truc/glm/releases/tag/0.9.9.9) - 2024-01-XX +### [GLM 1.0.0](https://github.com/g-truc/glm/releases/tag/1.0.0) - 2024-01-XX #### Features: - Added *GLM_EXT_scalar_reciprocal* with tests - Added *GLM_EXT_vector_reciprocal* with tests