Skip to content

Commit 0550c3b

Browse files
data-mankblaschke
authored andcommitted
Update GLM to 1.0.3
1 parent fea4963 commit 0550c3b

451 files changed

Lines changed: 29031 additions & 16892 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmake/FindGLM.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ include(FindPackageHandleStandardArgs)
1111

1212
find_package_handle_standard_args(GLM DEFAULT_MSG GLM_INCLUDE_FILE GLM_INCLUDE_DIR)
1313

14-
if(GLM_FOUND AND NOT TARGET GLM::GLM)
15-
add_library(GLM::GLM INTERFACE IMPORTED)
14+
if(GLM_FOUND AND NOT TARGET glm::glm)
15+
add_library(glm::glm INTERFACE IMPORTED)
1616

17-
set_target_properties(GLM::GLM PROPERTIES
17+
set_target_properties(glm::glm PROPERTIES
1818
INTERFACE_INCLUDE_DIRECTORIES "${GLM_INCLUDE_DIR}"
1919
)
2020
endif()

src/libprojectM/MilkdropPreset/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ target_link_libraries(MilkdropPreset
139139
libprojectM::API # For export header
140140
PUBLIC
141141
hlslparser
142-
GLM::GLM
142+
glm::glm
143143
)
144144

145145
if(BUILD_SHARED_LIBS)

src/libprojectM/Renderer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ target_link_libraries(Renderer
8585
PRIVATE
8686
libprojectM::API # For export header
8787
PUBLIC
88-
GLM::GLM
88+
glm::glm
8989
hlslparser
9090
stb_image
9191
glad

src/libprojectM/UserSprites/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ target_link_libraries(UserSprites
3434
libprojectM::API # For export header
3535
PUBLIC
3636
MilkdropPreset
37-
GLM::GLM
37+
glm::glm
3838
)
3939

4040
if(BUILD_SHARED_LIBS)

src/sdl-test-ui/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ add_executable(projectM-Test-UI
1919
target_link_libraries(projectM-Test-UI
2020
PRIVATE
2121
libprojectM::playlist
22-
GLM::GLM
22+
glm::glm
2323
SDL2::SDL2
2424
SDL2::SDL2main
2525
${CMAKE_DL_LIBS}

vendor/glm/CMakeLists.txt

100755100644
Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,69 @@
1+
file(GLOB ROOT_SOURCE *.cpp)
12
file(GLOB ROOT_INLINE *.inl)
23
file(GLOB ROOT_HEADER *.hpp)
34
file(GLOB ROOT_TEXT ../*.txt)
45
file(GLOB ROOT_MD ../*.md)
56
file(GLOB ROOT_NAT ../util/glm.natvis)
67

8+
file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
79
file(GLOB_RECURSE CORE_INLINE ./detail/*.inl)
810
file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)
911

12+
file(GLOB_RECURSE EXT_SOURCE ./ext/*.cpp)
1013
file(GLOB_RECURSE EXT_INLINE ./ext/*.inl)
1114
file(GLOB_RECURSE EXT_HEADER ./ext/*.hpp)
1215

16+
file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
1317
file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
1418
file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)
1519

20+
file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
1621
file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
1722
file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
1823

24+
file(GLOB_RECURSE SIMD_SOURCE ./simd/*.cpp)
1925
file(GLOB_RECURSE SIMD_INLINE ./simd/*.inl)
2026
file(GLOB_RECURSE SIMD_HEADER ./simd/*.h)
2127

2228
source_group("Text Files" FILES ${ROOT_TEXT} ${ROOT_MD})
23-
29+
source_group("Core Files" FILES ${CORE_SOURCE})
2430
source_group("Core Files" FILES ${CORE_INLINE})
2531
source_group("Core Files" FILES ${CORE_HEADER})
32+
source_group("EXT Files" FILES ${EXT_SOURCE})
2633
source_group("EXT Files" FILES ${EXT_INLINE})
2734
source_group("EXT Files" FILES ${EXT_HEADER})
35+
source_group("GTC Files" FILES ${GTC_SOURCE})
2836
source_group("GTC Files" FILES ${GTC_INLINE})
2937
source_group("GTC Files" FILES ${GTC_HEADER})
38+
source_group("GTX Files" FILES ${GTX_SOURCE})
3039
source_group("GTX Files" FILES ${GTX_INLINE})
3140
source_group("GTX Files" FILES ${GTX_HEADER})
41+
source_group("SIMD Files" FILES ${SIMD_SOURCE})
3242
source_group("SIMD Files" FILES ${SIMD_INLINE})
3343
source_group("SIMD Files" FILES ${SIMD_HEADER})
3444

35-
add_library(glm INTERFACE
36-
${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
37-
${ROOT_INLINE} ${ROOT_HEADER}
38-
${CORE_INLINE} ${CORE_HEADER}
39-
${EXT_INLINE} ${EXT_HEADER}
40-
${GTC_INLINE} ${GTC_HEADER}
41-
${GTX_INLINE} ${GTX_HEADER}
42-
${SIMD_INLINE} ${SIMD_HEADER}
43-
)
44-
45-
target_include_directories(glm
46-
INTERFACE
47-
"${CMAKE_CURRENT_SOURCE_DIR}/.."
48-
)
49-
50-
add_library(GLM::GLM ALIAS glm)
45+
add_library(glm-header-only INTERFACE)
46+
add_library(glm::glm-header-only ALIAS glm-header-only)
47+
48+
target_include_directories(glm-header-only INTERFACE
49+
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
50+
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
51+
)
52+
53+
if (GLM_BUILD_LIBRARY)
54+
add_library(glm
55+
${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
56+
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
57+
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
58+
${EXT_SOURCE} ${EXT_INLINE} ${EXT_HEADER}
59+
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
60+
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
61+
${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}
62+
)
63+
add_library(glm::glm ALIAS glm)
64+
target_link_libraries(glm PUBLIC glm-header-only)
65+
else()
66+
add_library(glm INTERFACE)
67+
add_library(glm::glm ALIAS glm)
68+
target_link_libraries(glm INTERFACE glm-header-only)
69+
endif()

vendor/glm/common.hpp

100755100644
Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
/// @defgroup core_func_common Common functions
77
/// @ingroup core
88
///
9-
/// Include <glm/common.hpp> to use these core features.
9+
/// Provides GLSL common functions
1010
///
1111
/// These all operate component-wise. The description is per component.
12+
///
13+
/// Include <glm/common.hpp> to use these core features.
1214

1315
#pragma once
1416

15-
#include "detail/setup.hpp"
1617
#include "detail/qualifier.hpp"
17-
#include "detail/type_int.hpp"
1818
#include "detail/_fixes.hpp"
1919

2020
namespace glm
@@ -28,9 +28,8 @@ namespace glm
2828
///
2929
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
3030
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
31-
/// @see qualifier
3231
template<typename genType>
33-
GLM_FUNC_DECL genType abs(genType x);
32+
GLM_FUNC_DECL GLM_CONSTEXPR genType abs(genType x);
3433

3534
/// Returns x if x >= 0; otherwise, it returns -x.
3635
///
@@ -41,7 +40,7 @@ namespace glm
4140
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
4241
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
4342
template<length_t L, typename T, qualifier Q>
44-
GLM_FUNC_DECL vec<L, T, Q> abs(vec<L, T, Q> const& x);
43+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> abs(vec<L, T, Q> const& x);
4544

4645
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
4746
///
@@ -52,7 +51,7 @@ namespace glm
5251
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
5352
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
5453
template<length_t L, typename T, qualifier Q>
55-
GLM_FUNC_DECL vec<L, T, Q> sign(vec<L, T, Q> const& x);
54+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> sign(vec<L, T, Q> const& x);
5655

5756
/// Returns a value equal to the nearest integer that is less then or equal to x.
5857
///
@@ -175,7 +174,7 @@ namespace glm
175174
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
176175
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
177176
template<typename genType>
178-
GLM_FUNC_DECL genType min(genType x, genType y);
177+
GLM_FUNC_DECL GLM_CONSTEXPR genType min(genType x, genType y);
179178

180179
/// Returns y if y < x; otherwise, it returns x.
181180
///
@@ -186,7 +185,7 @@ namespace glm
186185
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
187186
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
188187
template<length_t L, typename T, qualifier Q>
189-
GLM_FUNC_DECL vec<L, T, Q> min(vec<L, T, Q> const& x, T y);
188+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& x, T y);
190189

191190
/// Returns y if y < x; otherwise, it returns x.
192191
///
@@ -197,7 +196,7 @@ namespace glm
197196
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
198197
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
199198
template<length_t L, typename T, qualifier Q>
200-
GLM_FUNC_DECL vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
199+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
201200

202201
/// Returns y if x < y; otherwise, it returns x.
203202
///
@@ -206,7 +205,7 @@ namespace glm
206205
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
207206
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
208207
template<typename genType>
209-
GLM_FUNC_DECL genType max(genType x, genType y);
208+
GLM_FUNC_DECL GLM_CONSTEXPR genType max(genType x, genType y);
210209

211210
/// Returns y if x < y; otherwise, it returns x.
212211
///
@@ -217,7 +216,7 @@ namespace glm
217216
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
218217
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
219218
template<length_t L, typename T, qualifier Q>
220-
GLM_FUNC_DECL vec<L, T, Q> max(vec<L, T, Q> const& x, T y);
219+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, T y);
221220

222221
/// Returns y if x < y; otherwise, it returns x.
223222
///
@@ -228,7 +227,7 @@ namespace glm
228227
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
229228
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
230229
template<length_t L, typename T, qualifier Q>
231-
GLM_FUNC_DECL vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
230+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
232231

233232
/// Returns min(max(x, minVal), maxVal) for each component in x
234233
/// using the floating-point values minVal and maxVal.
@@ -238,7 +237,7 @@ namespace glm
238237
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
239238
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
240239
template<typename genType>
241-
GLM_FUNC_DECL genType clamp(genType x, genType minVal, genType maxVal);
240+
GLM_FUNC_DECL GLM_CONSTEXPR genType clamp(genType x, genType minVal, genType maxVal);
242241

243242
/// Returns min(max(x, minVal), maxVal) for each component in x
244243
/// using the floating-point values minVal and maxVal.
@@ -250,7 +249,7 @@ namespace glm
250249
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
251250
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
252251
template<length_t L, typename T, qualifier Q>
253-
GLM_FUNC_DECL vec<L, T, Q> clamp(vec<L, T, Q> const& x, T minVal, T maxVal);
252+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> clamp(vec<L, T, Q> const& x, T minVal, T maxVal);
254253

255254
/// Returns min(max(x, minVal), maxVal) for each component in x
256255
/// using the floating-point values minVal and maxVal.
@@ -262,7 +261,7 @@ namespace glm
262261
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
263262
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
264263
template<length_t L, typename T, qualifier Q>
265-
GLM_FUNC_DECL vec<L, T, Q> clamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
264+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> clamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
266265

267266
/// If genTypeU is a floating scalar or vector:
268267
/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
@@ -307,13 +306,13 @@ namespace glm
307306
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
308307
/// @endcode
309308
template<typename genTypeT, typename genTypeU>
310-
GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
309+
GLM_FUNC_DECL GLM_CONSTEXPR genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
311310

312311
template<length_t L, typename T, typename U, qualifier Q>
313-
GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a);
312+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a);
314313

315314
template<length_t L, typename T, typename U, qualifier Q>
316-
GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a);
315+
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a);
317316

318317
/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.
319318
///
@@ -405,7 +404,7 @@ namespace glm
405404
///
406405
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
407406
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
408-
GLM_FUNC_DECL int floatBitsToInt(float const& v);
407+
GLM_FUNC_DECL int floatBitsToInt(float v);
409408

410409
/// Returns a signed integer value representing
411410
/// the encoding of a floating-point value. The floatingpoint
@@ -425,7 +424,7 @@ namespace glm
425424
///
426425
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
427426
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
428-
GLM_FUNC_DECL uint floatBitsToUint(float const& v);
427+
GLM_FUNC_DECL uint floatBitsToUint(float v);
429428

430429
/// Returns a unsigned integer value representing
431430
/// the encoding of a floating-point value. The floatingpoint
@@ -447,7 +446,7 @@ namespace glm
447446
///
448447
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
449448
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
450-
GLM_FUNC_DECL float intBitsToFloat(int const& v);
449+
GLM_FUNC_DECL float intBitsToFloat(int v);
451450

452451
/// Returns a floating-point value corresponding to a signed
453452
/// integer encoding of a floating-point value.
@@ -471,7 +470,7 @@ namespace glm
471470
///
472471
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
473472
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
474-
GLM_FUNC_DECL float uintBitsToFloat(uint const& v);
473+
GLM_FUNC_DECL float uintBitsToFloat(uint v);
475474

476475
/// Returns a floating-point value corresponding to a
477476
/// unsigned integer encoding of a floating-point value.
@@ -510,8 +509,11 @@ namespace glm
510509
///
511510
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
512511
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
513-
template<typename genType, typename genIType>
514-
GLM_FUNC_DECL genType frexp(genType const& x, genIType& exp);
512+
template<typename genType>
513+
GLM_FUNC_DECL genType frexp(genType x, int& exp);
514+
515+
template<length_t L, typename T, qualifier Q>
516+
GLM_FUNC_DECL vec<L, T, Q> frexp(vec<L, T, Q> const& v, vec<L, int, Q>& exp);
515517

516518
/// Builds a floating-point number from x and the
517519
/// corresponding integral exponent of two in exp, returning:
@@ -524,8 +526,11 @@ namespace glm
524526
///
525527
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>;
526528
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
527-
template<typename genType, typename genIType>
528-
GLM_FUNC_DECL genType ldexp(genType const& x, genIType const& exp);
529+
template<typename genType>
530+
GLM_FUNC_DECL genType ldexp(genType const& x, int const& exp);
531+
532+
template<length_t L, typename T, qualifier Q>
533+
GLM_FUNC_DECL vec<L, T, Q> ldexp(vec<L, T, Q> const& v, vec<L, int, Q> const& exp);
529534

530535
/// @}
531536
}//namespace glm

vendor/glm/detail/_features.hpp

100755100644
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/// @ref core
2-
/// @file glm/detail/_features.hpp
3-
41
#pragma once
52

63
// #define GLM_CXX98_EXCEPTIONS

vendor/glm/detail/_fixes.hpp

100755100644
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/// @ref core
2-
/// @file glm/detail/_fixes.hpp
3-
41
#include <cmath>
52

63
//! Workaround for compatibility with other libraries

0 commit comments

Comments
 (0)