GLM Version 0.9.0
|
00001 00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) 00004 // Created : 2008-08-22 00005 // Updated : 2008-09-17 00006 // Licence : This source is under MIT License 00007 // File : glm/core/type_int.hpp 00009 00010 #ifndef glm_core_type_int 00011 #define glm_core_type_int 00012 00013 #include "../setup.hpp" 00014 #include "_detail.hpp" 00015 00016 namespace glm 00017 { 00018 namespace detail 00019 { 00020 #if defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC) 00021 typedef signed __int64 highp_int_t; 00022 typedef unsigned __int64 highp_uint_t; 00023 #elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC)) 00024 __extension__ typedef signed long long highp_int_t; 00025 __extension__ typedef unsigned long long highp_uint_t; 00026 //# if GLM_MODEL == GLM_MODEL_64 00027 // typedef signed long highp_int_t; 00028 // typedef unsigned long highp_uint_t; 00029 //# elif GLM_MODEL == GLM_MODEL_32 00030 // __extension__ typedef signed long long highp_int_t; 00031 // __extension__ typedef unsigned long long highp_uint_t; 00032 //# endif//GLM_MODEL 00033 #elif(defined(GLM_COMPILER_BC)) 00034 typedef Int64 highp_int_t; 00035 typedef Uint64 highp_uint_t; 00036 #else 00037 typedef signed long long highp_int_t; 00038 typedef unsigned long long highp_uint_t; 00039 #endif//GLM_COMPILER 00040 00041 GLM_DETAIL_IS_INT(signed char); 00042 GLM_DETAIL_IS_INT(signed short); 00043 GLM_DETAIL_IS_INT(signed int); 00044 GLM_DETAIL_IS_INT(signed long); 00045 GLM_DETAIL_IS_INT(highp_int_t); 00046 00047 GLM_DETAIL_IS_UINT(unsigned char); 00048 GLM_DETAIL_IS_UINT(unsigned short); 00049 GLM_DETAIL_IS_UINT(unsigned int); 00050 GLM_DETAIL_IS_UINT(unsigned long); 00051 GLM_DETAIL_IS_UINT(highp_uint_t); 00052 00053 typedef signed short lowp_int_t; 00054 typedef signed int mediump_int_t; 00055 typedef detail::highp_int_t highp_int_t; 00056 00057 typedef unsigned short lowp_uint_t; 00058 typedef unsigned int mediump_uint_t; 00059 typedef detail::highp_uint_t highp_uint_t; 00060 } 00061 //namespace detail 00062 00063 namespace core{ 00064 namespace type{ 00065 00066 namespace precision 00067 { 00071 typedef detail::lowp_int_t lowp_int; 00075 typedef detail::mediump_int_t mediump_int; 00079 typedef detail::highp_int_t highp_int; 00080 00084 typedef detail::lowp_uint_t lowp_uint; 00088 typedef detail::mediump_uint_t mediump_uint; 00092 typedef detail::highp_uint_t highp_uint; 00093 } 00094 //namespace precision 00095 00096 #ifndef GLM_PRECISION 00097 typedef precision::mediump_int int_t; 00098 #elif(GLM_PRECISION & GLM_PRECISION_HIGHP_INT) 00099 typedef precision::highp_int int_t; 00100 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUMP_INT) 00101 typedef precision::mediump_int int_t; 00102 #elif(GLM_PRECISION & GLM_PRECISION_LOWP_INT) 00103 typedef precision::lowp_int int_t; 00104 #else 00105 typedef mediump_int int_t; 00106 # pragma message("GLM message: Precisson undefined for signed integer number."); 00107 #endif//GLM_PRECISION 00108 00109 #ifndef GLM_PRECISION 00110 typedef precision::mediump_uint uint_t; 00111 #elif(GLM_PRECISION & GLM_PRECISION_HIGHP_UINT) 00112 typedef precision::highp_uint uint_t; 00113 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUMP_UINT) 00114 typedef precision::mediump_uint uint_t; 00115 #elif(GLM_PRECISION & GLM_PRECISION_LOWP_UINT) 00116 typedef precision::lowp_uint uint_t; 00117 #else 00118 typedef precision::mediump_uint uint_t; 00119 # pragma message("GLM message: Precisson undefined for unsigned integer number."); 00120 #endif//GLM_PRECISION 00121 00124 typedef uint_t uint; 00125 00126 }//namespace type 00127 }//namespace core 00128 }//namespace glm 00129 00130 #endif//glm_core_type_int