Skip to content

Commit

Permalink
GLM bumps to version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe committed Dec 21, 2023
1 parent 137a7e2 commit a5e720b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
35 changes: 21 additions & 14 deletions glm/detail/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@
#include <cassert>
#include <cstddef>

#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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5e720b

Please sign in to comment.