| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | #pragma once |
| 14 | |
| 15 | #include "../detail/setup.hpp" |
| 16 | |
| 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) |
| 18 | # pragma message("GLM: GLM_EXT_scalar_int_sized extension included") |
| 19 | #endif |
| 20 | |
| 21 | namespace glm{ |
| 22 | namespace detail |
| 23 | { |
| 24 | # if GLM_HAS_EXTENDED_INTEGER_TYPE |
| 25 | typedef std::int8_t int8; |
| 26 | typedef std::int16_t int16; |
| 27 | typedef std::int32_t int32; |
| 28 | # else |
| 29 | typedef char int8; |
| 30 | typedef short int16; |
| 31 | typedef int int32; |
| 32 | #endif |
| 33 | |
| 34 | template<> |
| 35 | struct is_int<int8> |
| 36 | { |
| 37 | enum test {value = ~0}; |
| 38 | }; |
| 39 | |
| 40 | template<> |
| 41 | struct is_int<int16> |
| 42 | { |
| 43 | enum test {value = ~0}; |
| 44 | }; |
| 45 | |
| 46 | template<> |
| 47 | struct is_int<int64> |
| 48 | { |
| 49 | enum test {value = ~0}; |
| 50 | }; |
| 51 | } |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | typedef detail::int8 int8; |
| 59 | |
| 60 | |
| 61 | typedef detail::int16 int16; |
| 62 | |
| 63 | |
| 64 | typedef detail::int32 int32; |
| 65 | |
| 66 | |
| 67 | typedef detail::int64 int64; |
| 68 | |
| 69 | |
| 70 | } |