| 0.9.9 API documenation

setup.hpp
1 #ifndef GLM_SETUP_INCLUDED
2
3 #include <cassert>
4 #include <cstddef>
5
6 #define GLM_VERSION_MAJOR 0
7 #define GLM_VERSION_MINOR 9
8 #define GLM_VERSION_PATCH 9
9 #define GLM_VERSION_REVISION 1
10 #define GLM_VERSION 991
11 #define GLM_VERSION_MESSAGE "GLM: version 0.9.9.1"
12
13 #define GLM_SETUP_INCLUDED GLM_VERSION
14
16 // Active states
17
18 #define GLM_DISABLE 0
19 #define GLM_ENABLE 1
20
22 // Messages
23
24 #if defined(GLM_FORCE_MESSAGES)
25 # define GLM_MESSAGES GLM_ENABLE
26 #else
27 # define GLM_MESSAGES GLM_DISABLE
28 #endif
29
31 // Detect the platform
32
33 #include "../simd/platform.h"
34
36 // Build model
37
38 #if defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__)
39 # define GLM_MODEL GLM_MODEL_64
40 #elif defined(__i386__) || defined(__ppc__)
41 # define GLM_MODEL GLM_MODEL_32
42 #else
43 # define GLM_MODEL GLM_MODEL_32
44 #endif//
45
46 #if !defined(GLM_MODEL) && GLM_COMPILER != 0
47 # error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
48 #endif//GLM_MODEL
49
51 // C++ Version
52
53 // User defines: GLM_FORCE_CXX98, GLM_FORCE_CXX03, GLM_FORCE_CXX11, GLM_FORCE_CXX14, GLM_FORCE_CXX17, GLM_FORCE_CXX2A
54
55 #define GLM_LANG_CXX98_FLAG (1 << 1)
56 #define GLM_LANG_CXX03_FLAG (1 << 2)
57 #define GLM_LANG_CXX0X_FLAG (1 << 3)
58 #define GLM_LANG_CXX11_FLAG (1 << 4)
59 #define GLM_LANG_CXX14_FLAG (1 << 5)
60 #define GLM_LANG_CXX17_FLAG (1 << 6)
61 #define GLM_LANG_CXX2A_FLAG (1 << 7)
62 #define GLM_LANG_CXXMS_FLAG (1 << 8)
63 #define GLM_LANG_CXXGNU_FLAG (1 << 9)
64
65 #define GLM_LANG_CXX98 GLM_LANG_CXX98_FLAG
66 #define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
67 #define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
68 #define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
69 #define GLM_LANG_CXX14 (GLM_LANG_CXX11 | GLM_LANG_CXX14_FLAG)
70 #define GLM_LANG_CXX17 (GLM_LANG_CXX14 | GLM_LANG_CXX17_FLAG)
71 #define GLM_LANG_CXX2A (GLM_LANG_CXX17 | GLM_LANG_CXX2A_FLAG)
72 #define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
73 #define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
74
75 #if (defined(_MSC_EXTENSIONS))
76 # define GLM_LANG_EXT GLM_LANG_CXXMS_FLAG
77 #elif ((GLM_COMPILER & (GLM_COMPILER_CLANG | GLM_COMPILER_GCC)) && (GLM_ARCH & GLM_ARCH_SIMD_BIT))
78 # define GLM_LANG_EXT GLM_LANG_CXXMS_FLAG
79 #else
80 # define GLM_LANG_EXT 0
81 #endif
82
83 #if (defined(GLM_FORCE_CXX_UNKNOWN))
84 # define GLM_LANG 0
85 #elif defined(GLM_FORCE_CXX2A)
86 # define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
87 # define GLM_LANG_STL11_FORCED
88 #elif defined(GLM_FORCE_CXX17)
89 # define GLM_LANG (GLM_LANG_CXX17 | GLM_LANG_EXT)
90 # define GLM_LANG_STL11_FORCED
91 #elif defined(GLM_FORCE_CXX14)
92 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_EXT)
93 # define GLM_LANG_STL11_FORCED
94 #elif defined(GLM_FORCE_CXX11)
95 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_EXT)
96 # define GLM_LANG_STL11_FORCED
97 #elif defined(GLM_FORCE_CXX03)
98 # define GLM_LANG (GLM_LANG_CXX03 | GLM_LANG_EXT)
99 #elif defined(GLM_FORCE_CXX98)
100 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_EXT)
101 #else
102 # if GLM_COMPILER & GLM_COMPILER_VC && defined(_MSVC_LANG)
103 # if GLM_COMPILER >= GLM_COMPILER_VC15_7
104 # define GLM_LANG_PLATFORM _MSVC_LANG
105 # elif GLM_COMPILER >= GLM_COMPILER_VC15
106 # if _MSVC_LANG > 201402L
107 # define GLM_LANG_PLATFORM 201402L
108 # else
109 # define GLM_LANG_PLATFORM _MSVC_LANG
110 # endif
111 # else
112 # define GLM_LANG_PLATFORM 0
113 # endif
114 # else
115 # define GLM_LANG_PLATFORM 0
116 # endif
117
118 # if __cplusplus > 201703L || GLM_LANG_PLATFORM > 201703L
119 # define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
120 # elif __cplusplus == 201703L || GLM_LANG_PLATFORM == 201703L
121 # define GLM_LANG (GLM_LANG_CXX17 | GLM_LANG_EXT)
122 # elif __cplusplus == 201402L || GLM_LANG_PLATFORM == 201402L
123 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_EXT)
124 # elif __cplusplus == 201103L || GLM_LANG_PLATFORM == 201103L
125 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_EXT)
126 # elif defined(__INTEL_CXX11_MODE__) || defined(_MSC_VER) || defined(__GXX_EXPERIMENTAL_CXX0X__)
127 # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_EXT)
128 # elif __cplusplus == 199711L
129 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_EXT)
130 # else
131 # define GLM_LANG (0 | GLM_LANG_EXT)
132 # endif
133 #endif
134
136 // Has of C++ features
137
138 // http://clang.llvm.org/cxx_status.html
139 // http://gcc.gnu.org/projects/cxx0x.html
140 // http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
141
142 // Android has multiple STLs but C++11 STL detection doesn't always work #284 #564
143 #if GLM_PLATFORM == GLM_PLATFORM_ANDROID && !defined(GLM_LANG_STL11_FORCED)
144 # define GLM_HAS_CXX11_STL 0
145 #elif GLM_COMPILER & GLM_COMPILER_CLANG
146 # if (defined(_LIBCPP_VERSION) && GLM_LANG & GLM_LANG_CXX11_FLAG) || defined(GLM_LANG_STL11_FORCED)
147 # define GLM_HAS_CXX11_STL 1
148 # else
149 # define GLM_HAS_CXX11_STL 0
150 # endif
151 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
152 # define GLM_HAS_CXX11_STL 1
153 #else
154 # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
155 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
156 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
157 ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))))
158 #endif
159
160 // N1720
161 #if GLM_COMPILER & GLM_COMPILER_CLANG
162 # define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
163 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
164 # define GLM_HAS_STATIC_ASSERT 1
165 #else
166 # define GLM_HAS_STATIC_ASSERT ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
167 ((GLM_COMPILER & GLM_COMPILER_CUDA)) || \
168 ((GLM_COMPILER & GLM_COMPILER_VC))))
169 #endif
170
171 // N1988
172 #if GLM_LANG & GLM_LANG_CXX11_FLAG
173 # define GLM_HAS_EXTENDED_INTEGER_TYPE 1
174 #else
175 # define GLM_HAS_EXTENDED_INTEGER_TYPE (\
176 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC)) || \
177 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CUDA)) || \
178 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG)))
179 #endif
180
181 // N2672 Initializer lists http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
182 #if GLM_COMPILER & GLM_COMPILER_CLANG
183 # define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
184 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
185 # define GLM_HAS_INITIALIZER_LISTS 1
186 #else
187 # define GLM_HAS_INITIALIZER_LISTS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
188 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
189 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
190 ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75))))
191 #endif
192
193 // N2544 Unrestricted unions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
194 #if GLM_COMPILER & GLM_COMPILER_CLANG
195 # define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
196 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
197 # define GLM_HAS_UNRESTRICTED_UNIONS 1
198 #else
199 # define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
200 (GLM_COMPILER & GLM_COMPILER_VC) || \
201 ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)))
202 #endif
203
204 // N2346
205 #if GLM_COMPILER & GLM_COMPILER_CLANG
206 # define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
207 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
208 # define GLM_HAS_DEFAULTED_FUNCTIONS 1
209 #else
210 # define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
211 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
212 ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
213 (GLM_COMPILER & GLM_COMPILER_CUDA)))
214 #endif
215
216 // N2118
217 #if GLM_COMPILER & GLM_COMPILER_CLANG
218 # define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
219 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
220 # define GLM_HAS_RVALUE_REFERENCES 1
221 #else
222 # define GLM_HAS_RVALUE_REFERENCES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
223 ((GLM_COMPILER & GLM_COMPILER_VC)) || \
224 ((GLM_COMPILER & GLM_COMPILER_CUDA))))
225 #endif
226
227 // N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
228 #if GLM_COMPILER & GLM_COMPILER_CLANG
229 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
230 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
231 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
232 #else
233 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
234 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
235 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
236 ((GLM_COMPILER & GLM_COMPILER_CUDA))))
237 #endif
238
239 // N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
240 #if GLM_COMPILER & GLM_COMPILER_CLANG
241 # define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
242 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
243 # define GLM_HAS_TEMPLATE_ALIASES 1
244 #else
245 # define GLM_HAS_TEMPLATE_ALIASES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
246 ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
247 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
248 ((GLM_COMPILER & GLM_COMPILER_CUDA))))
249 #endif
250
251 // N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
252 #if GLM_COMPILER & GLM_COMPILER_CLANG
253 # define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
254 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
255 # define GLM_HAS_RANGE_FOR 1
256 #else
257 # define GLM_HAS_RANGE_FOR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
258 ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
259 ((GLM_COMPILER & GLM_COMPILER_VC)) || \
260 ((GLM_COMPILER & GLM_COMPILER_CUDA))))
261 #endif
262
263 // N2341 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
264 #if GLM_COMPILER & GLM_COMPILER_CLANG
265 # define GLM_HAS_ALIGNOF __has_feature(cxx_alignas)
266 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
267 # define GLM_HAS_ALIGNOF 1
268 #else
269 # define GLM_HAS_ALIGNOF ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
270 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)) || \
271 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)) || \
272 ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA70))))
273 #endif
274
275 // N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
276 // N3652 Extended Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html
277 #if (GLM_ARCH & GLM_ARCH_SIMD_BIT) // Compiler SIMD intrinsics don't support constexpr...
278 # define GLM_HAS_CONSTEXPR 0
279 #elif (GLM_COMPILER & GLM_COMPILER_CLANG)
280 # define GLM_HAS_CONSTEXPR __has_feature(cxx_relaxed_constexpr)
281 #elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
282 # define GLM_HAS_CONSTEXPR 1
283 #else
284 # define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && GLM_HAS_INITIALIZER_LISTS && (\
285 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
286 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15))))
287 #endif
288
289 #if GLM_HAS_CONSTEXPR
290 # define GLM_CONSTEXPR constexpr
291 #else
292 # define GLM_CONSTEXPR
293 #endif
294
295 //
296 #if GLM_LANG & GLM_LANG_CXX11_FLAG
297 # define GLM_HAS_ASSIGNABLE 1
298 #else
299 # define GLM_HAS_ASSIGNABLE ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
300 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
301 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49))))
302 #endif
303
304 //
305 #define GLM_HAS_TRIVIAL_QUERIES 0
306
307 //
308 #if GLM_LANG & GLM_LANG_CXX11_FLAG
309 # define GLM_HAS_MAKE_SIGNED 1
310 #else
311 # define GLM_HAS_MAKE_SIGNED ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
312 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
313 ((GLM_COMPILER & GLM_COMPILER_CUDA))))
314 #endif
315
316 //
317 #if defined(GLM_FORCE_PURE)
318 # define GLM_HAS_BITSCAN_WINDOWS 0
319 #else
320 # define GLM_HAS_BITSCAN_WINDOWS ((GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
321 ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
322 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH & GLM_ARCH_X86_BIT))))
323 #endif
324
326 // OpenMP
327 #ifdef _OPENMP
328 # if GLM_COMPILER & GLM_COMPILER_GCC
329 # if GLM_COMPILER >= GLM_COMPILER_GCC61
330 # define GLM_HAS_OPENMP 45
331 # elif GLM_COMPILER >= GLM_COMPILER_GCC49
332 # define GLM_HAS_OPENMP 40
333 # elif GLM_COMPILER >= GLM_COMPILER_GCC47
334 # define GLM_HAS_OPENMP 31
335 # else
336 # define GLM_HAS_OPENMP 0
337 # endif
338 # elif GLM_COMPILER & GLM_COMPILER_CLANG
339 # if GLM_COMPILER >= GLM_COMPILER_CLANG38
340 # define GLM_HAS_OPENMP 31
341 # else
342 # define GLM_HAS_OPENMP 0
343 # endif
344 # elif GLM_COMPILER & GLM_COMPILER_VC
345 # define GLM_HAS_OPENMP 20
346 # elif GLM_COMPILER & GLM_COMPILER_INTEL
347 # if GLM_COMPILER >= GLM_COMPILER_INTEL16
348 # define GLM_HAS_OPENMP 40
349 # else
350 # define GLM_HAS_OPENMP 0
351 # endif
352 # else
353 # define GLM_HAS_OPENMP 0
354 # endif
355 #else
356 # define GLM_HAS_OPENMP 0
357 #endif
358
360 // nullptr
361
362 #if GLM_LANG & GLM_LANG_CXX0X_FLAG
363 # define GLM_CONFIG_NULLPTR GLM_ENABLE
364 #else
365 # define GLM_CONFIG_NULLPTR GLM_DISABLE
366 #endif
367
368 #if GLM_CONFIG_NULLPTR == GLM_ENABLE
369 # define GLM_NULLPTR nullptr
370 #else
371 # define GLM_NULLPTR 0
372 #endif
373
375 // Static assert
376
377 #if GLM_HAS_STATIC_ASSERT
378 # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
379 #elif GLM_COMPILER & GLM_COMPILER_VC
380 # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
381 #else
382 # define GLM_STATIC_ASSERT(x, message) assert(x)
383 #endif//GLM_LANG
384
386 // Qualifiers
387
388 #if GLM_COMPILER & GLM_COMPILER_CUDA
389 # define GLM_CUDA_FUNC_DEF __device__ __host__
390 # define GLM_CUDA_FUNC_DECL __device__ __host__
391 #else
392 # define GLM_CUDA_FUNC_DEF
393 # define GLM_CUDA_FUNC_DECL
394 #endif
395
396 #if defined(GLM_FORCE_INLINE)
397 # if GLM_COMPILER & GLM_COMPILER_VC
398 # define GLM_INLINE __forceinline
399 # define GLM_NEVER_INLINE __declspec((noinline))
400 # elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)
401 # define GLM_INLINE inline __attribute__((__always_inline__))
402 # define GLM_NEVER_INLINE __attribute__((__noinline__))
403 # elif GLM_COMPILER & GLM_COMPILER_CUDA
404 # define GLM_INLINE __forceinline__
405 # define GLM_NEVER_INLINE __noinline__
406 # else
407 # define GLM_INLINE inline
408 # define GLM_NEVER_INLINE
409 # endif//GLM_COMPILER
410 #else
411 # define GLM_INLINE inline
412 # define GLM_NEVER_INLINE
413 #endif//defined(GLM_FORCE_INLINE)
414
415 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
416 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
417
419 // Swizzle operators
420
421 // User defines: GLM_FORCE_SWIZZLE
422
423 #define GLM_SWIZZLE_DISABLED 0
424 #define GLM_SWIZZLE_OPERATOR 1
425 #define GLM_SWIZZLE_FUNCTION 2
426
427 #if defined(GLM_FORCE_XYZW_ONLY)
428 # undef GLM_FORCE_SWIZZLE
429 #endif
430
431 #if defined(GLM_FORCE_SWIZZLE) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
432 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
433 #elif defined(GLM_FORCE_SWIZZLE)
434 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
435 #else
436 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_DISABLED
437 #endif
438
440 // Allows using not basic types as genType
441
442 // #define GLM_FORCE_UNRESTRICTED_GENTYPE
443
444 #ifdef GLM_FORCE_UNRESTRICTED_GENTYPE
445 # define GLM_CONFIG_UNRESTRICTED_GENTYPE GLM_ENABLE
446 #else
447 # define GLM_CONFIG_UNRESTRICTED_GENTYPE GLM_DISABLE
448 #endif
449
451 // Clip control, define GLM_FORCE_DEPTH_ZERO_TO_ONE before including GLM
452 // to use a clip space between 0 to 1.
453 // Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM
454 // to use left handed coordinate system by default.
455
456 #define GLM_CLIP_CONTROL_ZO_BIT (1 << 0) // ZERO_TO_ONE
457 #define GLM_CLIP_CONTROL_NO_BIT (1 << 1) // NEGATIVE_ONE_TO_ONE
458 #define GLM_CLIP_CONTROL_LH_BIT (1 << 2) // LEFT_HANDED, For DirectX, Metal, Vulkan
459 #define GLM_CLIP_CONTROL_RH_BIT (1 << 3) // RIGHT_HANDED, For OpenGL, default in GLM
460
461 #define GLM_CLIP_CONTROL_LH_ZO (GLM_CLIP_CONTROL_LH_BIT | GLM_CLIP_CONTROL_ZO_BIT)
462 #define GLM_CLIP_CONTROL_LH_NO (GLM_CLIP_CONTROL_LH_BIT | GLM_CLIP_CONTROL_NO_BIT)
463 #define GLM_CLIP_CONTROL_RH_ZO (GLM_CLIP_CONTROL_RH_BIT | GLM_CLIP_CONTROL_ZO_BIT)
464 #define GLM_CLIP_CONTROL_RH_NO (GLM_CLIP_CONTROL_RH_BIT | GLM_CLIP_CONTROL_NO_BIT)
465
466 #ifdef GLM_FORCE_DEPTH_ZERO_TO_ONE
467 # ifdef GLM_FORCE_LEFT_HANDED
468 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_LH_ZO
469 # else
470 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_RH_ZO
471 # endif
472 #else
473 # ifdef GLM_FORCE_LEFT_HANDED
474 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_LH_NO
475 # else
476 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_RH_NO
477 # endif
478 #endif
479
481 // Qualifiers
482
483 #if (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
484 # define GLM_DEPRECATED __declspec(deprecated)
485 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
486 #elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_INTEL)
487 # define GLM_DEPRECATED __attribute__((__deprecated__))
488 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
489 #elif GLM_COMPILER & GLM_COMPILER_CUDA
490 # define GLM_DEPRECATED
491 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __align__(x)
492 #else
493 # define GLM_DEPRECATED
494 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name
495 #endif
496
498
499 #ifdef GLM_FORCE_EXPLICIT_CTOR
500 # define GLM_EXPLICIT explicit
501 #else
502 # define GLM_EXPLICIT
503 #endif
504
506 // Length type: all length functions returns a length_t type.
507 // When GLM_FORCE_SIZE_T_LENGTH is defined, length_t is a typedef of size_t otherwise
508 // length_t is a typedef of int like GLSL defines it.
509
510 #define GLM_LENGTH_INT 1
511 #define GLM_LENGTH_SIZE_T 2
512
513 #ifdef GLM_FORCE_SIZE_T_LENGTH
514 # define GLM_CONFIG_LENGTH_TYPE GLM_LENGTH_SIZE_T
515 #else
516 # define GLM_CONFIG_LENGTH_TYPE GLM_LENGTH_INT
517 #endif
518
519 namespace glm
520 {
521 using std::size_t;
522 # if GLM_CONFIG_LENGTH_TYPE == GLM_LENGTH_SIZE_T
523 typedef size_t length_t;
524 # else
525 typedef int length_t;
526 # endif
527 }//namespace glm
528
530 // constexpr
531
532 #if GLM_HAS_CONSTEXPR
533 # define GLM_CONFIG_CONSTEXP GLM_ENABLE
534
535 namespace glm
536 {
537 template<typename T, std::size_t N>
538 constexpr std::size_t countof(T const (&)[N])
539 {
540 return N;
541 }
542 }//namespace glm
543 # define GLM_COUNTOF(arr) glm::countof(arr)
544 #elif defined(_MSC_VER)
545 # define GLM_CONFIG_CONSTEXP GLM_DISABLE
546
547 # define GLM_COUNTOF(arr) _countof(arr)
548 #else
549 # define GLM_CONFIG_CONSTEXP GLM_DISABLE
550
551 # define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
552 #endif
553
555 // uint
556
557 namespace glm{
558 namespace detail
559 {
560 template<typename T>
561 struct is_int
562 {
563 enum test {value = 0};
564 };
565
566 template<>
567 struct is_int<unsigned int>
568 {
569 enum test {value = ~0};
570 };
571
572 template<>
573 struct is_int<signed int>
574 {
575 enum test {value = ~0};
576 };
577 }//namespace detail
578
579 typedef unsigned int uint;
580 }//namespace glm
581
583 // 64-bit int
584
585 #if GLM_HAS_EXTENDED_INTEGER_TYPE
586 # include <cstdint>
587 #endif
588
589 namespace glm{
590 namespace detail
591 {
592 # if GLM_HAS_EXTENDED_INTEGER_TYPE
593 typedef std::uint64_t uint64;
594 typedef std::int64_t int64;
595 # elif (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
596 typedef uint64_t uint64;
597 typedef int64_t int64;
598 # elif GLM_COMPILER & GLM_COMPILER_VC
599 typedef unsigned __int64 uint64;
600 typedef signed __int64 int64;
601 # elif GLM_COMPILER & GLM_COMPILER_GCC
602 # pragma GCC diagnostic ignored "-Wlong-long"
603 __extension__ typedef unsigned long long uint64;
604 __extension__ typedef signed long long int64;
605 # elif (GLM_COMPILER & GLM_COMPILER_CLANG)
606 # pragma clang diagnostic ignored "-Wc++11-long-long"
607 typedef unsigned long long uint64;
608 typedef signed long long int64;
609 # else//unknown compiler
610 typedef unsigned long long uint64;
611 typedef signed long long int64;
612 # endif
613 }//namespace detail
614 }//namespace glm
615
617 // make_unsigned
618
619 #if GLM_HAS_MAKE_SIGNED
620 # include <type_traits>
621
622 namespace glm{
623 namespace detail
624 {
625 using std::make_unsigned;
626 }//namespace detail
627 }//namespace glm
628
629 #else
630
631 namespace glm{
632 namespace detail
633 {
634 template<typename genType>
635 struct make_unsigned
636 {};
637
638 template<>
639 struct make_unsigned<char>
640 {
641 typedef unsigned char type;
642 };
643
644 template<>
645 struct make_unsigned<short>
646 {
647 typedef unsigned short type;
648 };
649
650 template<>
651 struct make_unsigned<int>
652 {
653 typedef unsigned int type;
654 };
655
656 template<>
657 struct make_unsigned<long>
658 {
659 typedef unsigned long type;
660 };
661
662 template<>
663 struct make_unsigned<int64>
664 {
665 typedef uint64 type;
666 };
667
668 template<>
669 struct make_unsigned<unsigned char>
670 {
671 typedef unsigned char type;
672 };
673
674 template<>
675 struct make_unsigned<unsigned short>
676 {
677 typedef unsigned short type;
678 };
679
680 template<>
681 struct make_unsigned<unsigned int>
682 {
683 typedef unsigned int type;
684 };
685
686 template<>
687 struct make_unsigned<unsigned long>
688 {
689 typedef unsigned long type;
690 };
691
692 template<>
693 struct make_unsigned<uint64>
694 {
695 typedef uint64 type;
696 };
697 }//namespace detail
698 }//namespace glm
699 #endif
700
702 // Only use x, y, z, w as vector type components
703
704 #ifdef GLM_FORCE_XYZW_ONLY
705 # define GLM_CONFIG_XYZW_ONLY GLM_ENABLE
706 #else
707 # define GLM_CONFIG_XYZW_ONLY GLM_DISABLE
708 #endif
709
711 // Configure the use of defaulted initialized types
712
713 #define GLM_CTOR_INITIALIZER_LIST (1 << 1)
714 #define GLM_CTOR_INITIALISATION (1 << 2)
715
716 #if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS
717 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INITIALIZER_LIST
718 #elif defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS
719 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INITIALISATION
720 #else
721 # define GLM_CONFIG_CTOR_INIT GLM_DISABLE
722 #endif
723
725 // Configure the use of defaulted function
726
727 #if GLM_HAS_DEFAULTED_FUNCTIONS && GLM_CONFIG_CTOR_INIT == GLM_DISABLE
728 # define GLM_CONFIG_DEFAULTED_FUNCTIONS GLM_ENABLE
729 # define GLM_DEFAULT = default
730 #else
731 # define GLM_CONFIG_DEFAULTED_FUNCTIONS GLM_DISABLE
732 # define GLM_DEFAULT
733 #endif
734
736 // Configure the use of aligned gentypes
737
738 #ifdef GLM_FORCE_ALIGNED // Legacy define
739 # define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
740 #endif
741
742 #if GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
743 # define GLM_CONFIG_ALIGNED_GENTYPES GLM_ENABLE
744 #else
745 # define GLM_CONFIG_ALIGNED_GENTYPES GLM_DISABLE
746 #endif
747
749 // Use SIMD instruction sets
750
751 #if GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG) && (GLM_ARCH & GLM_ARCH_SIMD_BIT)
752 # define GLM_CONFIG_SIMD GLM_ENABLE
753 #else
754 # define GLM_CONFIG_SIMD GLM_DISABLE
755 #endif
756
758 // Configure the use of anonymous structure as implementation detail
759
760 #if ((GLM_CONFIG_SIMD == GLM_ENABLE) || (GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR) || (GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE))
761 # define GLM_CONFIG_ANONYMOUS_STRUCT GLM_ENABLE
762 #else
763 # define GLM_CONFIG_ANONYMOUS_STRUCT GLM_DISABLE
764 #endif
765
767 // Precision
768
769 #define GLM_HIGHP 1
770 #define GLM_MEDIUMP 2
771 #define GLM_LOWP 3
772
773 #if defined(GLM_FORCE_PRECISION_HIGHP_BOOL) || defined(GLM_PRECISION_HIGHP_BOOL)
774 # define GLM_CONFIG_PRECISION_BOOL GLM_HIGHP
775 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_BOOL) || defined(GLM_PRECISION_MEDIUMP_BOOL)
776 # define GLM_CONFIG_PRECISION_BOOL GLM_MEDIUMP
777 #elif defined(GLM_FORCE_PRECISION_LOWP_BOOL) || defined(GLM_PRECISION_LOWP_BOOL)
778 # define GLM_CONFIG_PRECISION_BOOL GLM_LOWP
779 #else
780 # define GLM_CONFIG_PRECISION_BOOL GLM_HIGHP
781 #endif
782
783 #if defined(GLM_FORCE_PRECISION_HIGHP_INT) || defined(GLM_PRECISION_HIGHP_INT)
784 # define GLM_CONFIG_PRECISION_INT GLM_HIGHP
785 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_INT) || defined(GLM_PRECISION_MEDIUMP_INT)
786 # define GLM_CONFIG_PRECISION_INT GLM_MEDIUMP
787 #elif defined(GLM_FORCE_PRECISION_LOWP_INT) || defined(GLM_PRECISION_LOWP_INT)
788 # define GLM_CONFIG_PRECISION_INT GLM_LOWP
789 #else
790 # define GLM_CONFIG_PRECISION_INT GLM_HIGHP
791 #endif
792
793 #if defined(GLM_FORCE_PRECISION_HIGHP_UINT) || defined(GLM_PRECISION_HIGHP_UINT)
794 # define GLM_CONFIG_PRECISION_UINT GLM_HIGHP
795 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_UINT) || defined(GLM_PRECISION_MEDIUMP_UINT)
796 # define GLM_CONFIG_PRECISION_UINT GLM_MEDIUMP
797 #elif defined(GLM_FORCE_PRECISION_LOWP_UINT) || defined(GLM_PRECISION_LOWP_UINT)
798 # define GLM_CONFIG_PRECISION_UINT GLM_LOWP
799 #else
800 # define GLM_CONFIG_PRECISION_UINT GLM_HIGHP
801 #endif
802
803 #if defined(GLM_FORCE_PRECISION_HIGHP_FLOAT) || defined(GLM_PRECISION_HIGHP_FLOAT)
804 # define GLM_CONFIG_PRECISION_FLOAT GLM_HIGHP
805 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_FLOAT) || defined(GLM_PRECISION_MEDIUMP_FLOAT)
806 # define GLM_CONFIG_PRECISION_FLOAT GLM_MEDIUMP
807 #elif defined(GLM_FORCE_PRECISION_LOWP_FLOAT) || defined(GLM_PRECISION_LOWP_FLOAT)
808 # define GLM_CONFIG_PRECISION_FLOAT GLM_LOWP
809 #else
810 # define GLM_CONFIG_PRECISION_FLOAT GLM_HIGHP
811 #endif
812
813 #if defined(GLM_FORCE_PRECISION_HIGHP_DOUBLE) || defined(GLM_PRECISION_HIGHP_DOUBLE)
814 # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP
815 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_DOUBLE) || defined(GLM_PRECISION_MEDIUMP_DOUBLE)
816 # define GLM_CONFIG_PRECISION_DOUBLE GLM_MEDIUMP
817 #elif defined(GLM_FORCE_PRECISION_LOWP_DOUBLE) || defined(GLM_PRECISION_LOWP_DOUBLE)
818 # define GLM_CONFIG_PRECISION_DOUBLE GLM_LOWP
819 #else
820 # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP
821 #endif
822
824 // Check inclusions of different versions of GLM
825
826 #elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION))
827 # error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error."
828 #elif GLM_SETUP_INCLUDED == GLM_VERSION
829
831 // Messages
832
833 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_MESSAGE_DISPLAYED)
834 # define GLM_MESSAGE_DISPLAYED
835 # define GLM_STR_HELPER(x) #x
836 # define GLM_STR(x) GLM_STR_HELPER(x)
837
838 // Report GLM version
839 # pragma message (GLM_STR(GLM_VERSION_MESSAGE))
840
841 // Report C++ language
842 # if (GLM_LANG & GLM_LANG_CXX2A_FLAG) && (GLM_LANG & GLM_LANG_EXT)
843 # pragma message("GLM: C++ 2A with extensions")
844 # elif (GLM_LANG & GLM_LANG_CXX2A_FLAG)
845 # pragma message("GLM: C++ 2A")
846 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG) && (GLM_LANG & GLM_LANG_EXT)
847 # pragma message("GLM: C++ 17 with extensions")
848 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG)
849 # pragma message("GLM: C++ 17")
850 # elif (GLM_LANG & GLM_LANG_CXX14_FLAG) && (GLM_LANG & GLM_LANG_EXT)
851 # pragma message("GLM: C++ 14 with extensions")
852 # elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
853 # pragma message("GLM: C++ 14")
854 # elif (GLM_LANG & GLM_LANG_CXX11_FLAG) && (GLM_LANG & GLM_LANG_EXT)
855 # pragma message("GLM: C++ 11 with extensions")
856 # elif (GLM_LANG & GLM_LANG_CXX11_FLAG)
857 # pragma message("GLM: C++ 11")
858 # elif (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_LANG & GLM_LANG_EXT)
859 # pragma message("GLM: C++ 0x with extensions")
860 # elif (GLM_LANG & GLM_LANG_CXX0X_FLAG)
861 # pragma message("GLM: C++ 0x")
862 # elif (GLM_LANG & GLM_LANG_CXX03_FLAG) && (GLM_LANG & GLM_LANG_EXT)
863 # pragma message("GLM: C++ 03 with extensions")
864 # elif (GLM_LANG & GLM_LANG_CXX03_FLAG)
865 # pragma message("GLM: C++ 03")
866 # elif (GLM_LANG & GLM_LANG_CXX98_FLAG) && (GLM_LANG & GLM_LANG_EXT)
867 # pragma message("GLM: C++ 98 with extensions")
868 # elif (GLM_LANG & GLM_LANG_CXX98_FLAG)
869 # pragma message("GLM: C++ 98")
870 # else
871 # pragma message("GLM: C++ language undetected")
872 # endif//GLM_LANG
873
874 // Report compiler detection
875 # if GLM_COMPILER & GLM_COMPILER_CUDA
876 # pragma message("GLM: CUDA compiler detected")
877 # elif GLM_COMPILER & GLM_COMPILER_VC
878 # pragma message("GLM: Visual C++ compiler detected")
879 # elif GLM_COMPILER & GLM_COMPILER_CLANG
880 # pragma message("GLM: Clang compiler detected")
881 # elif GLM_COMPILER & GLM_COMPILER_INTEL
882 # pragma message("GLM: Intel Compiler detected")
883 # elif GLM_COMPILER & GLM_COMPILER_GCC
884 # pragma message("GLM: GCC compiler detected")
885 # else
886 # pragma message("GLM: Compiler not detected")
887 # endif
888
889 // Report build target
890 # if (GLM_ARCH & GLM_ARCH_AVX2_BIT) && (GLM_MODEL == GLM_MODEL_64)
891 # pragma message("GLM: x86 64 bits with AVX2 instruction set build target")
892 # elif (GLM_ARCH & GLM_ARCH_AVX2_BIT) && (GLM_MODEL == GLM_MODEL_32)
893 # pragma message("GLM: x86 32 bits with AVX2 instruction set build target")
894
895 # elif (GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_MODEL == GLM_MODEL_64)
896 # pragma message("GLM: x86 64 bits with AVX instruction set build target")
897 # elif (GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_MODEL == GLM_MODEL_32)
898 # pragma message("GLM: x86 32 bits with AVX instruction set build target")
899
900 # elif (GLM_ARCH & GLM_ARCH_SSE42_BIT) && (GLM_MODEL == GLM_MODEL_64)
901 # pragma message("GLM: x86 64 bits with SSE4.2 instruction set build target")
902 # elif (GLM_ARCH & GLM_ARCH_SSE42_BIT) && (GLM_MODEL == GLM_MODEL_32)
903 # pragma message("GLM: x86 32 bits with SSE4.2 instruction set build target")
904
905 # elif (GLM_ARCH & GLM_ARCH_SSE41_BIT) && (GLM_MODEL == GLM_MODEL_64)
906 # pragma message("GLM: x86 64 bits with SSE4.1 instruction set build target")
907 # elif (GLM_ARCH & GLM_ARCH_SSE41_BIT) && (GLM_MODEL == GLM_MODEL_32)
908 # pragma message("GLM: x86 32 bits with SSE4.1 instruction set build target")
909
910 # elif (GLM_ARCH & GLM_ARCH_SSSE3_BIT) && (GLM_MODEL == GLM_MODEL_64)
911 # pragma message("GLM: x86 64 bits with SSSE3 instruction set build target")
912 # elif (GLM_ARCH & GLM_ARCH_SSSE3_BIT) && (GLM_MODEL == GLM_MODEL_32)
913 # pragma message("GLM: x86 32 bits with SSSE3 instruction set build target")
914
915 # elif (GLM_ARCH & GLM_ARCH_SSE3_BIT) && (GLM_MODEL == GLM_MODEL_64)
916 # pragma message("GLM: x86 64 bits with SSE3 instruction set build target")
917 # elif (GLM_ARCH & GLM_ARCH_SSE3_BIT) && (GLM_MODEL == GLM_MODEL_32)
918 # pragma message("GLM: x86 32 bits with SSE3 instruction set build target")
919
920 # elif (GLM_ARCH & GLM_ARCH_SSE2_BIT) && (GLM_MODEL == GLM_MODEL_64)
921 # pragma message("GLM: x86 64 bits with SSE2 instruction set build target")
922 # elif (GLM_ARCH & GLM_ARCH_SSE2_BIT) && (GLM_MODEL == GLM_MODEL_32)
923 # pragma message("GLM: x86 32 bits with SSE2 instruction set build target")
924
925 # elif (GLM_ARCH & GLM_ARCH_X86_BIT) && (GLM_MODEL == GLM_MODEL_64)
926 # pragma message("GLM: x86 64 bits build target")
927 # elif (GLM_ARCH & GLM_ARCH_X86_BIT) && (GLM_MODEL == GLM_MODEL_32)
928 # pragma message("GLM: x86 32 bits build target")
929
930 # elif (GLM_ARCH & GLM_ARCH_NEON_BIT) && (GLM_MODEL == GLM_MODEL_64)
931 # pragma message("GLM: ARM 64 bits with Neon instruction set build target")
932 # elif (GLM_ARCH & GLM_ARCH_NEON_BIT) && (GLM_MODEL == GLM_MODEL_32)
933 # pragma message("GLM: ARM 32 bits with Neon instruction set build target")
934
935 # elif (GLM_ARCH & GLM_ARCH_ARM_BIT) && (GLM_MODEL == GLM_MODEL_64)
936 # pragma message("GLM: ARM 64 bits build target")
937 # elif (GLM_ARCH & GLM_ARCH_ARM_BIT) && (GLM_MODEL == GLM_MODEL_32)
938 # pragma message("GLM: ARM 32 bits build target")
939
940 # elif (GLM_ARCH & GLM_ARCH_MIPS_BIT) && (GLM_MODEL == GLM_MODEL_64)
941 # pragma message("GLM: MIPS 64 bits build target")
942 # elif (GLM_ARCH & GLM_ARCH_MIPS_BIT) && (GLM_MODEL == GLM_MODEL_32)
943 # pragma message("GLM: MIPS 32 bits build target")
944
945 # elif (GLM_ARCH & GLM_ARCH_PPC_BIT) && (GLM_MODEL == GLM_MODEL_64)
946 # pragma message("GLM: PowerPC 64 bits build target")
947 # elif (GLM_ARCH & GLM_ARCH_PPC_BIT) && (GLM_MODEL == GLM_MODEL_32)
948 # pragma message("GLM: PowerPC 32 bits build target")
949 # else
950 # pragma message("GLM: Unknown build target")
951 # endif//GLM_ARCH
952
953 // Report platform name
954 # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
955 # pragma message("GLM: QNX platform detected")
956 //# elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
957 //# pragma message("GLM: iOS platform detected")
958 # elif(GLM_PLATFORM & GLM_PLATFORM_APPLE)
959 # pragma message("GLM: Apple platform detected")
960 # elif(GLM_PLATFORM & GLM_PLATFORM_WINCE)
961 # pragma message("GLM: WinCE platform detected")
962 # elif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
963 # pragma message("GLM: Windows platform detected")
964 # elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)
965 # pragma message("GLM: Native Client detected")
966 # elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
967 # pragma message("GLM: Android platform detected")
968 # elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
969 # pragma message("GLM: Linux platform detected")
970 # elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
971 # pragma message("GLM: UNIX platform detected")
972 # elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)
973 # pragma message("GLM: platform unknown")
974 # else
975 # pragma message("GLM: platform not detected")
976 # endif
977
978 // Report whether only xyzw component are used
979 # if defined GLM_FORCE_XYZW_ONLY
980 # pragma message("GLM: GLM_FORCE_XYZW_ONLY is defined. Only x, y, z and w component are available in vector type. This define disables swizzle operators and SIMD instruction sets")
981 # endif
982
983 // Report swizzle operator support
984 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
985 # pragma message("GLM: GLM_FORCE_SWIZZLE is defined, swizzling operators enabled")
986 # elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
987 # pragma message("GLM: GLM_FORCE_SWIZZLE is defined, swizzling functions enabled. Enable compiler C++ language extensions to enable swizzle operators.")
988 # else
989 # pragma message("GLM: GLM_FORCE_SWIZZLE is undefined. swizzling functions or operators are disabled.")
990 # endif
991
992 // Report .length() type
993 # if GLM_CONFIG_LENGTH_TYPE == GLM_LENGTH_SIZE_T
994 # pragma message("GLM: GLM_FORCE_SIZE_T_LENGTH is defined. .length() returns a glm::length_t, a typedef of std::size_t.")
995 # else
996 # pragma message("GLM: GLM_FORCE_SIZE_T_LENGTH is undefined. .length() returns a glm::length_t, a typedef of int following GLSL.")
997 # endif
998
999 # if GLM_CONFIG_UNRESTRICTED_GENTYPE == GLM_ENABLE
1000 # pragma message("GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is defined. Removes GLSL restrictions on valid function genTypes.")
1001 # else
1002 # pragma message("GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is undefined. Follows strictly GLSL on valid function genTypes.")
1003 # endif
1004
1005 # ifdef GLM_FORCE_SINGLE_ONLY
1006 # pragma message("GLM: GLM_FORCE_SINGLE_ONLY is defined. Using only single precision floating-point types")
1007 # endif
1008
1009 # if defined(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES) && (GLM_CONFIG_ALIGNED_GENTYPES == GLM_DISABLE)
1010 # undef GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
1011 # pragma message("GLM: GLM_FORCE_DEFAULT_ALIGNED_GENTYPES is defined but is disabled. It requires C++11 and language extensions")
1012 # endif
1013
1014 # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
1015 # pragma message("GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is defined. Using zero to one depth clip space.")
1016 # else
1017 # pragma message("GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is undefined. Using negative one to one depth clip space.")
1018 # endif
1019
1020 # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
1021 # pragma message("GLM: GLM_FORCE_LEFT_HANDED is defined. Using left handed coordinate system.")
1022 # else
1023 # pragma message("GLM: GLM_FORCE_LEFT_HANDED is undefined. Using right handed coordinate system.")
1024 # endif
1025 #endif//GLM_MESSAGES
1026
1027 #endif//GLM_SETUP_INCLUDED
glm::uint64
detail::uint64 uint64
64 bit unsigned integer type.
Definition: scalar_uint_sized.hpp:67
glm::int64_t
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
glm::int64
detail::int64 int64
64 bit signed integer type.
Definition: scalar_int_sized.hpp:67
glm::uint64_t
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
glm
Definition: common.hpp:20