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