# GLM: type_int.hpp Source File

- Main Page
- Namespaces
- Files

- File List

# type_int.hpp

    00001
    00002 // OpenGL Mathematics Copyright (c) 2005 - 2009 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.h
    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 #else
    00034                 typedef signed long                                                     highp_int_t;
    00035                 typedef unsigned long                                           highp_uint_t;
    00036 #endif//GLM_COMPILER
    00037
    00038                 GLM_DETAIL_IS_INT(signed char);
    00039                 GLM_DETAIL_IS_INT(signed short);
    00040                 GLM_DETAIL_IS_INT(signed int);
    00041                 GLM_DETAIL_IS_INT(signed long);
    00042                 GLM_DETAIL_IS_INT(highp_int_t);
    00043
    00044                 GLM_DETAIL_IS_UINT(unsigned char);
    00045                 GLM_DETAIL_IS_UINT(unsigned short);
    00046                 GLM_DETAIL_IS_UINT(unsigned int);
    00047                 GLM_DETAIL_IS_UINT(unsigned long);
    00048                 GLM_DETAIL_IS_UINT(highp_uint_t);
    00049         }
    00050         //namespace detail
    00051
    00052         namespace core{
    00053         namespace type{
    00054         namespace scalar{
    00055
    00056         namespace precision
    00057         {
    00058                 typedef signed short                    lowp_int_t;
    00059                 typedef signed int                              mediump_int_t;
    00060                 typedef detail::highp_int_t             highp_int_t;
    00061
    00062                 typedef unsigned short                  lowp_uint_t;
    00063                 typedef unsigned int                    mediump_uint_t;
    00064                 typedef detail::highp_uint_t    highp_uint_t;
    00065
    00069                 typedef lowp_int_t                              lowp_int;
    00073                 typedef mediump_int_t                   mediump_int;
    00077                 typedef highp_int_t                             highp_int;
    00078
    00082                 typedef lowp_uint_t                             lowp_uint;
    00086                 typedef mediump_uint_t                  mediump_uint;
    00090                 typedef highp_uint_t                    highp_uint;
    00091         }
    00092         //namespace precision
    00093
    00094 #ifndef GLM_PRECISION
    00095         typedef precision::mediump_int_t                        int_t;
    00096 #elif(GLM_PRECISION & GLM_PRECISION_HIGHP_INT)
    00097         typedef precision::highp_int_t                          int_t;
    00098 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUMP_INT)
    00099         typedef precision::mediump_int_t                        int_t;
    00100 #elif(GLM_PRECISION & GLM_PRECISION_LOWP_INT)
    00101         typedef precision::lowp_int_t                           int_t;
    00102 #else
    00103         typedef mediump_int_t                   int_t;
    00104 #       pragma message("GLM message: Precisson undefined for signed integer number.");
    00105 #endif//GLM_PRECISION
    00106
    00107 #ifndef GLM_PRECISION
    00108         typedef precision::mediump_uint_t                       uint_t;
    00109 #elif(GLM_PRECISION & GLM_PRECISION_HIGHP_UINT)
    00110         typedef precision::highp_uint_t                         uint_t;
    00111 #elif(GLM_PRECISION & GLM_PRECISION_MEDIUMP_UINT)
    00112         typedef precision::mediump_uint_t                       uint_t;
    00113 #elif(GLM_PRECISION & GLM_PRECISION_LOWP_UINT)
    00114         typedef precision::lowp_uint_t                          uint_t;
    00115 #else
    00116         typedef precision::mediump_uint_t                       uint_t;
    00117 #       pragma message("GLM message: Precisson undefined for unsigned integer number.");
    00118 #endif//GLM_PRECISION
    00119
    00122         typedef uint_t                                                          uint;
    00123
    00124         }//namespace scalar
    00125         }//namespace type
    00126         }//namespace core
    00127 }
    00128
    00129 #endif//glm_core_type_int