type_int.hpp
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 namespace detail
00018 {
00019         typedef signed short                    lowp_int_t;
00020         typedef signed int                              mediump_int_t;
00021         typedef sint64                                  highp_int_t;
00022 
00023         typedef unsigned short                  lowp_uint_t;
00024         typedef unsigned int                    mediump_uint_t;
00025         typedef uint64                                  highp_uint_t;
00026 
00027         GLM_DETAIL_IS_INT(signed char);
00028         GLM_DETAIL_IS_INT(signed short);
00029         GLM_DETAIL_IS_INT(signed int);
00030         GLM_DETAIL_IS_INT(signed long);
00031         GLM_DETAIL_IS_INT(highp_int_t);
00032 
00033         GLM_DETAIL_IS_UINT(unsigned char);
00034         GLM_DETAIL_IS_UINT(unsigned short);
00035         GLM_DETAIL_IS_UINT(unsigned int);
00036         GLM_DETAIL_IS_UINT(unsigned long);
00037         GLM_DETAIL_IS_UINT(highp_uint_t);
00038 }//namespace detail
00039 
00040 namespace core{
00041 namespace type{
00042 namespace precision 
00043 {
00048         typedef detail::lowp_int_t                              lowp_int;
00053         typedef detail::mediump_int_t                           mediump_int;
00058         typedef detail::highp_int_t                             highp_int;
00059 
00064         typedef detail::lowp_uint_t                             lowp_uint;
00069         typedef detail::mediump_uint_t                  mediump_uint;
00074         typedef detail::highp_uint_t                            highp_uint;
00075 }//namespace precision
00076 
00077 #if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
00078         typedef precision::mediump_int                          int_t;
00079 #elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
00080         typedef precision::highp_int                                    int_t;
00081 #elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
00082         typedef precision::mediump_int                          int_t;
00083 #elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT))
00084         typedef precision::lowp_int                                     int_t;
00085 #else
00086 #       error "GLM error: multiple default precision requested for signed interger types"
00087 #endif
00088 
00089 #if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
00090         typedef precision::mediump_uint                         uint_t;
00091 #elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
00092         typedef precision::highp_uint                                   uint_t;
00093 #elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
00094         typedef precision::mediump_uint                         uint_t;
00095 #elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT))
00096         typedef precision::lowp_uint                                    uint_t;
00097 #else
00098 #       error "GLM error: multiple default precision requested for unsigned interger types"
00099 #endif
00100 
00103         typedef uint_t                                                          uint;
00104 
00105 }//namespace type
00106 }//namespace core
00107 }//namespace glm
00108 
00109 #endif//glm_core_type_int