- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List

setup.hpp
Go to the documentation of this file.

    00001
    00002
    00003
    00004
    00005
    00006
    00007
    00008
    00009
    00010
    00011
    00012
    00013
    00014
    00015
    00016
    00017
    00018
    00019
    00020
    00021
    00022
    00023
    00024
    00025
    00026
    00027
    00028
    00029 #ifndef glm_setup
    00030 #define glm_setup
    00031
    00033 // Version
    00034
    00035 #define GLM_VERSION                                     93
    00036 #define GLM_VERSION_MAJOR                       0
    00037 #define GLM_VERSION_MINOR                       9
    00038 #define GLM_VERSION_PATCH                       3
    00039 #define GLM_VERSION_REVISION            0
    00040
    00042 // Platform
    00043
    00044 #define GLM_PLATFORM_UNKNOWN            0x00000000
    00045 #define GLM_PLATFORM_WINDOWS            0x00010000
    00046 #define GLM_PLATFORM_LINUX                      0x00020000
    00047 #define GLM_PLATFORM_MACOSX                     0x00040000
    00048 #define GLM_PLATFORM_IOS                        0x00080000
    00049 #define GLM_PLATFORM_ANDROID            0x00100000
    00050 #define GLM_PLATFORM_CHROME_NACL        0x00200000
    00051 #define GLM_PLATFORM_UNIX                       0x00040000
    00052
    00053 #ifdef GLM_FORCE_PLATFORM_UNKNOWN
    00054 #       define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
    00055 #elif defined(_WIN32)
    00056 #       define GLM_PLATFORM GLM_PLATFORM_WINDOWS
    00057 #elif defined(__unix)
    00058 #   if defined(__APPLE__)
    00059 #       include "TargetConditionals.h"
    00060 #       if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR)
    00061 #           define GLM_PLATFORM GLM_PLATFORM_IOS
    00062 #       elif defined(TARGET_OS_MAC)
    00063 #           define GLM_PLATFORM GLM_PLATFORM_MACOSX
    00064 #       else
    00065 #           define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
    00066 #       endif
    00067 #   elif defined(ANDROID)
    00068 #       define GLM_PLATFORM GLM_PLATFORM_ANDROID
    00069 #   elif defined(__linux)
    00070 #       define GLM_PLATFORM GLM_PLATFORM_LINUX
    00071 #   else
    00072 #       define GLM_PLATFORM GLM_PLATFORM_UNIX
    00073 #   endif
    00074 #elif defined(__native_client__)
    00075 #       define GLM_PLATFORM GLM_PLATFORM_CHROME_NACL
    00076 #else
    00077 #       define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
    00078 #endif//
    00079
    00080 // Report platform detection
    00081 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))
    00082 #       define GLM_MESSAGE_PLATFORM_DISPLAYED
    00083 #       if(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
    00084 #               pragma message("GLM: Windows platform detected")
    00085 #       elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
    00086 #               pragma message("GLM: iOS platform detected")
    00087 #       elif(GLM_PLATFORM & GLM_PLATFORM_MACOSX)
    00088 #               pragma message("GLM: MacOSX platform detected")
    00089 #       elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
    00090 #               pragma message("GLM: Linux platform detected")
    00091 #       elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
    00092 #               pragma message("GLM: UNIX platform detected")
    00093 #       elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
    00094 #               pragma message("GLM: Android platform detected")
    00095 #       elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)
    00096 #               pragma message("GLM: Chrone Native Client detected")
    00097 #       elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)
    00098 #               pragma message("GLM: platform unknown")
    00099 #       else
    00100 #               pragma message("GLM: platform not detected")
    00101 #       endif
    00102 #endif//GLM_MESSAGE
    00103
    00105 // Compiler
    00106
    00107 // User defines: GLM_FORCE_COMPILER_UNKNOWN
    00108 // TODO ? __llvm__
    00109
    00110 #define GLM_COMPILER_UNKNOWN            0x00000000
    00111
    00112 // Visual C++ defines
    00113 #define GLM_COMPILER_VC                         0x01000000
    00114 #define GLM_COMPILER_VC2                        0x01000010
    00115 #define GLM_COMPILER_VC4                        0x01000020
    00116 #define GLM_COMPILER_VC5                        0x01000030
    00117 #define GLM_COMPILER_VC6                        0x01000040
    00118 #define GLM_COMPILER_VC2002                     0x01000050
    00119 #define GLM_COMPILER_VC2003                     0x01000060
    00120 #define GLM_COMPILER_VC2005                     0x01000070
    00121 #define GLM_COMPILER_VC2008                     0x01000080
    00122 #define GLM_COMPILER_VC2010                     0x01000090
    00123 #define GLM_COMPILER_VC2011                     0x010000A0
    00124
    00125 // GCC defines
    00126 #define GLM_COMPILER_GCC            0x02000000
    00127 #define GLM_COMPILER_GCC_LLVM       0x02000001
    00128 #define GLM_COMPILER_GCC_CLANG      0x02000002
    00129 #define GLM_COMPILER_GCC30                      0x02000010
    00130 #define GLM_COMPILER_GCC31                      0x02000020
    00131 #define GLM_COMPILER_GCC32                      0x02000030
    00132 #define GLM_COMPILER_GCC33                      0x02000040
    00133 #define GLM_COMPILER_GCC34                      0x02000050
    00134 #define GLM_COMPILER_GCC35                      0x02000060
    00135 #define GLM_COMPILER_GCC40                      0x02000070
    00136 #define GLM_COMPILER_GCC41                      0x02000080
    00137 #define GLM_COMPILER_GCC42                      0x02000090
    00138 #define GLM_COMPILER_GCC43                      0x020000A0
    00139 #define GLM_COMPILER_GCC44                      0x020000B0
    00140 #define GLM_COMPILER_GCC45                      0x020000C0
    00141 #define GLM_COMPILER_GCC46                      0x020000D0
    00142 #define GLM_COMPILER_GCC47                      0x020000E0
    00143 #define GLM_COMPILER_GCC48                      0x020000F0
    00144 #define GLM_COMPILER_GCC49                      0x02000100
    00145 #define GLM_COMPILER_GCC50                      0x02000200
    00146
    00147 // G++ command line to display defined
    00148 // echo "" | g++ -E -dM -x c++ - | sort
    00149
    00150 // Borland C++ defines. How to identify BC?
    00151 #define GLM_COMPILER_BC                         0x04000000
    00152 #define GLM_COMPILER_BCB4                       0x04000100
    00153 #define GLM_COMPILER_BCB5                       0x04000200
    00154 #define GLM_COMPILER_BCB6                       0x04000300
    00155 //#define GLM_COMPILER_BCBX                     0x04000400 // What's the version value?
    00156 #define GLM_COMPILER_BCB2009            0x04000500
    00157
    00158 // CodeWarrior
    00159 #define GLM_COMPILER_CODEWARRIOR        0x08000000
    00160
    00161 // CUDA
    00162 #define GLM_COMPILER_CUDA           0x10000000
    00163 #define GLM_COMPILER_CUDA30                     0x10000010
    00164 #define GLM_COMPILER_CUDA31                     0x10000020
    00165 #define GLM_COMPILER_CUDA32                     0x10000030
    00166 #define GLM_COMPILER_CUDA40                     0x10000040
    00167 #define GLM_COMPILER_CUDA41                     0x10000050
    00168 #define GLM_COMPILER_CUDA42                     0x10000060
    00169
    00170 // Clang
    00171 #define GLM_COMPILER_CLANG          0x20000000
    00172 #define GLM_COMPILER_CLANG26            0x20000010
    00173 #define GLM_COMPILER_CLANG27            0x20000020
    00174 #define GLM_COMPILER_CLANG28            0x20000030
    00175 #define GLM_COMPILER_CLANG29            0x20000040
    00176 #define GLM_COMPILER_CLANG30            0x20000050
    00177 #define GLM_COMPILER_CLANG31            0x20000060
    00178 #define GLM_COMPILER_CLANG32            0x20000070
    00179 #define GLM_COMPILER_CLANG33            0x20000080
    00180
    00181 // LLVM GCC
    00182 #define GLM_COMPILER_LLVM_GCC           0x40000000
    00183
    00184 // Intel
    00185 #define GLM_COMPILER_INTEL          0x80000000
    00186 #define GLM_COMPILER_INTEL9                     0x80000010
    00187 #define GLM_COMPILER_INTEL10_0          0x80000020
    00188 #define GLM_COMPILER_INTEL10_1          0x80000030
    00189 #define GLM_COMPILER_INTEL11_0          0x80000040
    00190 #define GLM_COMPILER_INTEL11_1          0x80000050
    00191 #define GLM_COMPILER_INTEL12_0          0x80000060
    00192 #define GLM_COMPILER_INTEL12_1          0x80000070
    00193 #define GLM_COMPILER_INTEL13_0          0x80000080
    00194
    00195 // Build model
    00196 #define GLM_MODEL_32                            0x00000010
    00197 #define GLM_MODEL_64                            0x00000020
    00198
    00199 // Force generic C++ compiler
    00200 #ifdef GLM_FORCE_COMPILER_UNKNOWN
    00201 #       define GLM_COMPILER GLM_COMPILER_UNKNOWN
    00202
    00203 #elif defined(__INTEL_COMPILER)
    00204 #       if __INTEL_COMPILER == 900
    00205 #               define GLM_COMPILER GLM_COMPILER_INTEL9
    00206 #       elif __INTEL_COMPILER == 1000
    00207 #               define GLM_COMPILER GLM_COMPILER_INTEL10_0
    00208 #       elif __INTEL_COMPILER == 1010
    00209 #               define GLM_COMPILER GLM_COMPILER_INTEL10_1
    00210 #       elif __INTEL_COMPILER == 1100
    00211 #               define GLM_COMPILER GLM_COMPILER_INTEL11_0
    00212 #       elif __INTEL_COMPILER == 1110
    00213 #               define GLM_COMPILER GLM_COMPILER_INTEL11_1
    00214 #       elif __INTEL_COMPILER == 1200
    00215 #               define GLM_COMPILER GLM_COMPILER_INTEL12_0
    00216 #       elif __INTEL_COMPILER == 1210
    00217 #               define GLM_COMPILER GLM_COMPILER_INTEL12_1
    00218 #       elif __INTEL_COMPILER == 1300
    00219 #               define GLM_COMPILER GLM_COMPILER_INTEL13_0
    00220 #       else
    00221 #               define GLM_COMPILER GLM_COMPILER_INTEL
    00222 #       endif
    00223
    00224 // CUDA
    00225 #elif defined(__CUDACC__)
    00226 #       define GLM_COMPILER GLM_COMPILER_CUDA
    00227 /*
    00228 #       if CUDA_VERSION < 3000
    00229 #               error "GLM requires CUDA 3.0 or higher"
    00230 #       elif CUDA_VERSION == 3000
    00231 #               define GLM_COMPILER GLM_COMPILER_CUDA30
    00232 #       elif CUDA_VERSION == 3010
    00233 #               define GLM_COMPILER GLM_COMPILER_CUDA31
    00234 #       elif CUDA_VERSION == 3020
    00235 #               define GLM_COMPILER GLM_COMPILER_CUDA32
    00236 #       elif CUDA_VERSION == 4000
    00237 #               define GLM_COMPILER GLM_COMPILER_CUDA40
    00238 #       elif CUDA_VERSION == 4010
    00239 #               define GLM_COMPILER GLM_COMPILER_CUDA41
    00240 #       elif CUDA_VERSION == 4020
    00241 #               define GLM_COMPILER GLM_COMPILER_CUDA42
    00242 #       else
    00243 #               define GLM_COMPILER GLM_COMPILER_CUDA
    00244 #       endif
    00245 */
    00246
    00247 // Visual C++
    00248 #elif defined(_MSC_VER)
    00249 #       if _MSC_VER == 900
    00250 #               define GLM_COMPILER GLM_COMPILER_VC2
    00251 #       elif _MSC_VER == 1000
    00252 #               define GLM_COMPILER GLM_COMPILER_VC4
    00253 #       elif _MSC_VER == 1100
    00254 #               define GLM_COMPILER GLM_COMPILER_VC5
    00255 #       elif _MSC_VER == 1200
    00256 #               define GLM_COMPILER GLM_COMPILER_VC6
    00257 #       elif _MSC_VER == 1300
    00258 #               define GLM_COMPILER GLM_COMPILER_VC2002
    00259 #       elif _MSC_VER == 1310
    00260 #               define GLM_COMPILER GLM_COMPILER_VC2003
    00261 #       elif _MSC_VER == 1400
    00262 #               define GLM_COMPILER GLM_COMPILER_VC2005
    00263 #       elif _MSC_VER == 1500
    00264 #               define GLM_COMPILER GLM_COMPILER_VC2008
    00265 #       elif _MSC_VER == 1600
    00266 #               define GLM_COMPILER GLM_COMPILER_VC2010
    00267 #       elif _MSC_VER == 1700
    00268 #               define GLM_COMPILER GLM_COMPILER_VC2011
    00269 #       else//_MSC_VER
    00270 #               define GLM_COMPILER GLM_COMPILER_VC
    00271 #       endif//_MSC_VER
    00272
    00273 // Clang
    00274 #elif defined(__clang__)
    00275 #       if(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 6)
    00276 #               define GLM_COMPILER GLM_COMPILER_CLANG26
    00277 #       elif(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 7)
    00278 #               define GLM_COMPILER GLM_COMPILER_CLANG27
    00279 #       elif(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 8)
    00280 #               define GLM_COMPILER GLM_COMPILER_CLANG28
    00281 #       elif(CLANG_VERSION_MAJOR == 2) && (CLANG_VERSION_MINOR == 9)
    00282 #               define GLM_COMPILER GLM_COMPILER_CLANG29
    00283 #       elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 0)
    00284 #               define GLM_COMPILER GLM_COMPILER_CLANG30
    00285 #       elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 1)
    00286 #               define GLM_COMPILER GLM_COMPILER_CLANG31
    00287 #       elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 2)
    00288 #               define GLM_COMPILER GLM_COMPILER_CLANG32
    00289 #       elif(CLANG_VERSION_MAJOR == 3) && (CLANG_VERSION_MINOR == 3)
    00290 #               define GLM_COMPILER GLM_COMPILER_CLANG33
    00291 #       else
    00292 #               define GLM_COMPILER GLM_COMPILER_CLANG
    00293 #   endif
    00294
    00295 // G++
    00296 #elif defined(__GNUC__)// || defined(__llvm__) || defined(__clang__)
    00297 #   if defined (__llvm__)
    00298 #       define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
    00299 #   elif defined (__clang__)
    00300 #       define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_CLANG
    00301 #   else
    00302 #       define GLM_COMPILER_GCC_EXTRA 0
    00303 #   endif
    00304 #
    00305 #       if   (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)
    00306 #               define GLM_COMPILER GLM_COMPILER_GCC32
    00307 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
    00308 #               define GLM_COMPILER GLM_COMPILER_GCC33
    00309 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
    00310 #               define GLM_COMPILER GLM_COMPILER_GCC34
    00311 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
    00312 #               define GLM_COMPILER GLM_COMPILER_GCC35
    00313 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)
    00314 #               define GLM_COMPILER (GLM_COMPILER_GCC40 | GLM_COMPILER_GCC_EXTRA)
    00315 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)
    00316 #               define GLM_COMPILER (GLM_COMPILER_GCC41 | GLM_COMPILER_GCC_EXTRA)
    00317 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
    00318 #               define GLM_COMPILER (GLM_COMPILER_GCC42 | GLM_COMPILER_GCC_EXTRA)
    00319 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
    00320 #               define GLM_COMPILER (GLM_COMPILER_GCC43 | GLM_COMPILER_GCC_EXTRA)
    00321 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
    00322 #               define GLM_COMPILER (GLM_COMPILER_GCC44 | GLM_COMPILER_GCC_EXTRA)
    00323 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
    00324 #               define GLM_COMPILER (GLM_COMPILER_GCC45 | GLM_COMPILER_GCC_EXTRA)
    00325 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
    00326 #               define GLM_COMPILER (GLM_COMPILER_GCC46 | GLM_COMPILER_GCC_EXTRA)
    00327 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
    00328 #               define GLM_COMPILER (GLM_COMPILER_GCC47 | GLM_COMPILER_GCC_EXTRA)
    00329 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
    00330 #               define GLM_COMPILER (GLM_COMPILER_GCC48 | GLM_COMPILER_GCC_EXTRA)
    00331 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 9)
    00332 #               define GLM_COMPILER (GLM_COMPILER_GCC49 | GLM_COMPILER_GCC_EXTRA)
    00333 #       elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
    00334 #               define GLM_COMPILER (GLM_COMPILER_GCC50 | GLM_COMPILER_GCC_EXTRA)
    00335 #       else
    00336 #               define GLM_COMPILER (GLM_COMPILER_GCC | GLM_COMPILER_GCC_EXTRA)
    00337 #       endif
    00338
    00339 // Borland C++
    00340 #elif defined(_BORLANDC_)
    00341 #       if defined(VER125)
    00342 #               define GLM_COMPILER GLM_COMPILER_BCB4
    00343 #       elif defined(VER130)
    00344 #               define GLM_COMPILER GLM_COMPILER_BCB5
    00345 #       elif defined(VER140)
    00346 #               define GLM_COMPILER GLM_COMPILER_BCB6
    00347 #       elif defined(VER200)
    00348 #               define GLM_COMPILER GLM_COMPILER_BCB2009
    00349 #       else
    00350 #               define GLM_COMPILER GLM_COMPILER_BC
    00351 #       endif
    00352
    00353 // Codewarrior
    00354 #elif defined(__MWERKS__)
    00355 #       define GLM_COMPILER GLM_COMPILER_CODEWARRIOR
    00356
    00357 #else
    00358 #       define GLM_COMPILER GLM_COMPILER_UNKNOWN
    00359 #endif
    00360
    00361 #ifndef GLM_COMPILER
    00362 #error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message."
    00363 #endif//GLM_COMPILER
    00364
    00365 // Report compiler detection
    00366 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))
    00367 #       define GLM_MESSAGE_COMPILER_DISPLAYED
    00368 #       if(GLM_COMPILER & GLM_COMPILER_CUDA)
    00369 #               pragma message("GLM: CUDA compiler detected")
    00370 #       elif(GLM_COMPILER & GLM_COMPILER_VC)
    00371 #               pragma message("GLM: Visual C++ compiler detected")
    00372 #       elif(GLM_COMPILER & GLM_COMPILER_CLANG)
    00373 #               pragma message("GLM: Clang compiler detected")
    00374 #       elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
    00375 #               pragma message("GLM: LLVM GCC compiler detected")
    00376 #       elif(GLM_COMPILER & GLM_COMPILER_GCC)
    00377 #       if(GLM_COMPILER == GLM_COMPILER_GCC_LLVM)
    00378 #           pragma message("GLM: LLVM GCC compiler detected")
    00379 #       elif(GLM_COMPILER == GLM_COMPILER_GCC_CLANG)
    00380 #           pragma message("GLM: CLANG compiler detected")
    00381 #       else
    00382 #           pragma message("GLM: GCC compiler detected")
    00383 #       endif
    00384 #       elif(GLM_COMPILER & GLM_COMPILER_BC)
    00385 #               pragma message("GLM: Borland compiler detected but not supported")
    00386 #       elif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)
    00387 #               pragma message("GLM: Codewarrior compiler detected but not supported")
    00388 #       else
    00389 #               pragma message("GLM: Compiler not detected")
    00390 #       endif
    00391 #endif//GLM_MESSAGE
    00392
    00394 // Build model //
    00395
    00396 #if(GLM_COMPILER & GLM_COMPILER_VC)
    00397 #       if defined(_M_X64)
    00398 #               define GLM_MODEL        GLM_MODEL_64
    00399 #       else
    00400 #               define GLM_MODEL        GLM_MODEL_32
    00401 #       endif//_M_X64
    00402 #elif(GLM_COMPILER & GLM_COMPILER_GCC)
    00403 #       if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__) || defined(__LP64__) || defined(__x86_64__)
    00404 #               define GLM_MODEL        GLM_MODEL_64
    00405 #       else
    00406 #               define GLM_MODEL        GLM_MODEL_32
    00407 #       endif//
    00408 #else
    00409 #       define GLM_MODEL        GLM_MODEL_32
    00410 #endif//
    00411
    00412 #if(!defined(GLM_MODEL) && GLM_COMPILER != 0)
    00413 #error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
    00414 #endif//GLM_MODEL
    00415
    00416 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED))
    00417 #       define GLM_MESSAGE_MODEL_DISPLAYED
    00418 #       if(GLM_MODEL == GLM_MODEL_64)
    00419 #               pragma message("GLM: 64 bits model")
    00420 #       elif(GLM_MODEL == GLM_MODEL_32)
    00421 #               pragma message("GLM: 32 bits model")
    00422 #       endif//GLM_MODEL
    00423 #endif//GLM_MESSAGE
    00424
    00426 // C++ Version //
    00427
    00428 // User defines: GLM_FORCE_CXX98
    00429
    00430 #define GLM_LANG_CXX                    (0 << 0)
    00431 #define GLM_LANG_CXX98                  ((1 << 1) | GLM_LANG_CXX)
    00432 #define GLM_LANG_CXX03                  ((1 << 2) | GLM_LANG_CXX98)
    00433 #define GLM_LANG_CXX0X                  ((1 << 3) | GLM_LANG_CXX03)
    00434 #define GLM_LANG_CXX11                  ((1 << 4) | GLM_LANG_CXX11)
    00435 #define GLM_LANG_CXXMS                  (1 << 5)
    00436 #define GLM_LANG_CXXGNU                 (1 << 6)
    00437
    00438 #if(defined(GLM_FORCE_CXX11))
    00439 #       define GLM_LANG GLM_LANG_CXX11
    00440 #elif(defined(GLM_FORCE_CXX03))
    00441 #       define GLM_LANG GLM_LANG_CXX03
    00442 #elif(defined(GLM_FORCE_CXX98))
    00443 #       define GLM_LANG GLM_LANG_CXX98
    00444 #else
    00445 #       if(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__STRICT_ANSI__))
    00446 #               define GLM_LANG GLM_LANG_CXX98
    00447 #       elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
    00448 #               define GLM_LANG GLM_LANG_CXX0X
    00449 #       elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS))
    00450 #               define GLM_LANG GLM_LANG_CXXMS
    00451 #       elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && !defined(_MSC_EXTENSIONS))
    00452 #               if(GLM_COMPILER >= GLM_COMPILER_VC2010)
    00453 #                       define GLM_LANG GLM_LANG_CXX0X
    00454 #               else
    00455 #                       define GLM_LANG GLM_LANG_CXX98
    00456 #               endif//(GLM_COMPILER == GLM_COMPILER_VC2010)
    00457 #       else
    00458 #               define GLM_LANG GLM_LANG_CXX
    00459 #       endif
    00460 #endif
    00461
    00462 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED))
    00463 #       define GLM_MESSAGE_LANG_DISPLAYED
    00464 #       if(GLM_LANG == GLM_LANG_CXX98)
    00465 #               pragma message("GLM: C++98")
    00466 #       elif(GLM_LANG == GLM_LANG_CXX03)
    00467 #               pragma message("GLM: C++03")
    00468 #       elif(GLM_LANG == GLM_LANG_CXX0X)
    00469 #               pragma message("GLM: C++0x")
    00470 #       elif(GLM_LANG == GLM_LANG_CXX11)
    00471 #               pragma message("GLM: C++11")
    00472 #       elif(GLM_LANG == GLM_LANG_CXXGNU)
    00473 #               pragma message("GLM: C++ with GNU language extensions")
    00474 #       elif(GLM_LANG == GLM_LANG_CXXMS)
    00475 #               pragma message("GLM: C++ with VC language extensions")
    00476 #       endif//GLM_MODEL
    00477 #endif//GLM_MESSAGE
    00478
    00480 // Platform
    00481
    00482 // User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX
    00483
    00484 #define GLM_ARCH_PURE           0x0000 //(0x0000)
    00485 #define GLM_ARCH_SSE2           0x0001 //(0x0001)
    00486 #define GLM_ARCH_SSE3           0x0003 //(0x0002 | GLM_ARCH_SSE2)
    00487 #define GLM_ARCH_AVX            0x0007 //(0x0004 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
    00488
    00489 #if(defined(GLM_FORCE_PURE))
    00490 #       define GLM_ARCH GLM_ARCH_PURE
    00491 #elif(defined(GLM_FORCE_AVX))
    00492 #       define GLM_ARCH GLM_ARCH_AVX
    00493 #elif(defined(GLM_FORCE_SSE3))
    00494 #       define GLM_ARCH GLM_ARCH_SSE3
    00495 #elif(defined(GLM_FORCE_SSE2))
    00496 #       define GLM_ARCH GLM_ARCH_SSE2
    00497 #elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))
    00498 #       if(defined(_M_CEE_PURE))
    00499 #               define GLM_ARCH GLM_ARCH_PURE
    00500 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
    00501 #               if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
    00502 #                       define GLM_ARCH GLM_ARCH_AVX //GLM_ARCH_AVX (Require SP1)
    00503 #               else
    00504 #                       define GLM_ARCH GLM_ARCH_SSE3
    00505 #               endif
    00506 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2008)
    00507 #               define GLM_ARCH GLM_ARCH_SSE3
    00508 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2005)
    00509 #               define GLM_ARCH GLM_ARCH_SSE2
    00510 #       else
    00511 #               define GLM_ARCH GLM_ARCH_PURE
    00512 #       endif
    00513 #elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
    00514 #       if(defined(__AVX__))
    00515 #               define GLM_ARCH GLM_ARCH_AVX
    00516 #       elif(defined(__SSE3__))
    00517 #               define GLM_ARCH GLM_ARCH_SSE3
    00518 #       elif(defined(__SSE2__))
    00519 #               define GLM_ARCH GLM_ARCH_SSE2
    00520 #       else
    00521 #               define GLM_ARCH GLM_ARCH_PURE
    00522 #       endif
    00523 #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)))
    00524 #       if(defined(__AVX__))
    00525 #               define GLM_ARCH GLM_ARCH_AVX
    00526 #       elif(defined(__SSE3__))
    00527 #               define GLM_ARCH GLM_ARCH_SSE3
    00528 #       elif(defined(__SSE2__))
    00529 #               define GLM_ARCH GLM_ARCH_SSE2
    00530 #       else
    00531 #               define GLM_ARCH GLM_ARCH_PURE
    00532 #       endif
    00533 #else
    00534 #       define GLM_ARCH GLM_ARCH_PURE
    00535 #endif
    00536
    00537 #if(GLM_ARCH != GLM_ARCH_PURE)
    00538 #if((GLM_ARCH & GLM_ARCH_AVX) == GLM_ARCH_AVX)
    00539 #       include <immintrin.h>
    00540 #endif//GLM_ARCH
    00541 #if((GLM_ARCH & GLM_ARCH_SSE3) == GLM_ARCH_SSE3)
    00542 #       include <pmmintrin.h>
    00543 #endif//GLM_ARCH
    00544 #if((GLM_ARCH & GLM_ARCH_SSE2) == GLM_ARCH_SSE2)
    00545 #       include <emmintrin.h>
    00546 #endif//GLM_ARCH
    00547 #endif//(GLM_ARCH != GLM_ARCH_PURE)
    00548
    00549 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))
    00550 #       define GLM_MESSAGE_ARCH_DISPLAYED
    00551 #       if(GLM_ARCH == GLM_ARCH_PURE)
    00552 #               pragma message("GLM: Platform independent")
    00553 #       elif(GLM_ARCH == GLM_ARCH_SSE2)
    00554 #               pragma message("GLM: SSE2 build platform")
    00555 #       elif(GLM_ARCH == GLM_ARCH_SSE3)
    00556 #               pragma message("GLM: SSE3 build platform")
    00557 #       elif(GLM_ARCH == GLM_ARCH_AVX)
    00558 #               pragma message("GLM: AVX build platform")
    00559 #       endif//GLM_ARCH
    00560 #endif//GLM_MESSAGE
    00561
    00563 // Support check macros
    00564
    00565 #define GLM_SUPPORT_ANONYMOUS_UNION() \
    00566         ((GLM_LANG & GLM_LANG_CXX98) == GLM_LANG_CXX98)
    00567
    00568 #define GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() \
    00569         (((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X)))
    00570
    00571 #define GLM_SUPPORT_SWIZZLE_OPERATOR() \
    00572         (/*defined(GLM_SWIZZLE) && */GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE())
    00573
    00574 #define GLM_SUPPORT_SWIZZLE_FUNCTION() defined(GLM_SWIZZLE)
    00575
    00577 // Components
    00578
    00579 //#define GLM_FORCE_ONLY_XYZW
    00580 #define GLM_COMPONENT_ONLY_XYZW                         0 // To disable multiple vector component names access.
    00581 #define GLM_COMPONENT_CXX98                                     1 //
    00582 #define GLM_COMPONENT_CXX11                                     2 // To use anonymous union to provide multiple component names access for class valType. Visual C++ only.
    00583
    00584 #if(GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE() && !defined(GLM_FORCE_ONLY_XYZW))
    00585 #       define GLM_COMPONENT GLM_COMPONENT_CXX11
    00586 #elif(GLM_SUPPORT_ANONYMOUS_UNION() && !defined(GLM_FORCE_ONLY_XYZW))
    00587 #       define GLM_COMPONENT GLM_COMPONENT_CXX98
    00588 #else
    00589 #       define GLM_COMPONENT GLM_COMPONENT_ONLY_XYZW
    00590 #endif
    00591
    00592 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPONENT_DISPLAYED))
    00593 #       define GLM_MESSAGE_COMPONENT_DISPLAYED
    00594 #       if(GLM_COMPONENT == GLM_COMPONENT_CXX98)
    00595 #               pragma message("GLM: x,y,z,w; r,g,b,a; s,t,p,q component names except of half based vector types")
    00596 #       elif(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
    00597 #               pragma message("GLM: x,y,z,w component names for all vector types")
    00598 #       elif(GLM_COMPONENT == GLM_COMPONENT_CXX11)
    00599 #               pragma message("GLM: x,y,z,w; r,g,b,a; s,t,p,q component names for all vector types")
    00600 #       else
    00601 #               error "GLM: GLM_COMPONENT value unknown"
    00602 #       endif//GLM_MESSAGE_COMPONENT_DISPLAYED
    00603 #endif//GLM_MESSAGE
    00604
    00606 // Static assert
    00607
    00608 #if(GLM_LANG == GLM_LANG_CXX0X)
    00609 #       define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
    00610 #elif(defined(BOOST_STATIC_ASSERT))
    00611 #       define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
    00612 #elif(GLM_COMPILER & GLM_COMPILER_VC)
    00613 #       define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
    00614 #else
    00615 #       define GLM_STATIC_ASSERT(x, message)
    00616 #       define GLM_STATIC_ASSERT_NULL
    00617 #endif//GLM_LANG
    00618
    00620 // Qualifiers
    00621
    00622 // User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
    00623
    00624 #if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))
    00625 #   define GLM_CUDA_FUNC_DEF __device__ __host__
    00626 #       define GLM_CUDA_FUNC_DECL __device__ __host__
    00627 #else
    00628 #   define GLM_CUDA_FUNC_DEF
    00629 #       define GLM_CUDA_FUNC_DECL
    00630 #endif
    00631
    00632 #if GLM_COMPILER & GLM_COMPILER_GCC
    00633 #define GLM_VAR_USED __attribute__ ((unused))
    00634 #else
    00635 #define GLM_VAR_USED
    00636 #endif
    00637
    00638 #if(defined(GLM_FORCE_INLINE))
    00639 #   if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
    00640 #       define GLM_INLINE __forceinline
    00641 #   elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))
    00642 #       define GLM_INLINE __attribute__((always_inline))
    00643 #   else
    00644 #       define GLM_INLINE inline
    00645 #   endif//GLM_COMPILER
    00646 #else
    00647 #   define GLM_INLINE inline
    00648 #endif//defined(GLM_FORCE_INLINE)
    00649
    00650 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
    00651 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
    00652
    00654 // Swizzle operators
    00655
    00656 // User defines: GLM_SWIZZLE
    00657
    00658 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))
    00659 #       define GLM_MESSAGE_SWIZZLE_DISPLAYED
    00660 #       if(GLM_SUPPORT_SWIZZLE_OPERATOR())
    00661 #               pragma message("GLM: Swizzling operators enabled")
    00662 #       elif(GLM_SUPPORT_SWIZZLE_FUNCTION())
    00663 #               pragma message("GLM: Swizzling operators supported through swizzling functions")
    00664 #       else
    00665 #               pragma message("GLM: Swizzling operators disabled")
    00666 #       endif
    00667 #endif//GLM_MESSAGE
    00668
    00669 #endif//glm_setup