Updated to GLM 0.9.B

This commit is contained in:
Christophe Riccio
2010-04-29 11:56:52 +01:00
parent 7c7b1d0b3d
commit 05439738b8
266 changed files with 15552 additions and 8092 deletions

View File

@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2008 G-Truc Creation (www.g-truc.net)
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2006-11-13
// Updated : 2009-08-24
// Updated : 2010-01-28
// Licence : This source is under MIT License
// File : glm/setup.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -13,8 +13,11 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// Version
#define GLM_VERSION 84
#define GLM_REVISION 1010
#define GLM_VERSION 90
#define GLM_VERSION_MAJOR 0
#define GLM_VERSION_MINOR 9
#define GLM_VERSION_PATCH B
#define GLM_VERSION_REVISION 2
///////////////////////////////////////////////////////////////////////////////////////////////////
// Common values
@@ -36,7 +39,7 @@
#define GLM_MESSAGE_ALL GLM_MESSAGE_WARNING | GLM_MESSAGE_NOTIFICATION | GLM_MESSAGE_CORE | GLM_MESSAGE_EXTS | GLM_MESSAGE_SETUP
//! By default:
// #define GLM_MESSAGE GLM_MESSAGE_QUIET
// #define GLM_MESSAGE GLM_MESSAGE_QUIET
///////////////////////////////////////////////////////////////////////////////////////////////////
// Precision
@@ -55,53 +58,48 @@
#define GLM_PRECISION_MEDIUMP_UINT 0x00120000
#define GLM_PRECISION_HIGHP_UINT 0x00130000
///////////////////////////////////////////////////////////////////////////////////////////////////
// Use options
// To disable multiple vector component names access.
// GLM_USE_ONLY_XYZW
// To use anonymous union to provide multiple component names access for class valType. Visual C++ only.
// GLM_USE_ANONYMOUS_UNION
///////////////////////////////////////////////////////////////////////////////////////////////////
// Compiler
#define GLM_COMPILER_NONE 0x00000000
#define GLM_COMPILER_UNKNOWNED 0x00000000
// Visual C++ defines
#define GLM_COMPILER_VC 0x01000000
#define GLM_COMPILER_VC60 0x01000040 // unsupported
#define GLM_COMPILER_VC70 0x01000080 // unsupported
#define GLM_COMPILER_VC71 0x01000100 // unsupported
#define GLM_COMPILER_VC80 0x01000200
#define GLM_COMPILER_VC90 0x01000400
#define GLM_COMPILER_VC2010 0x01000800
#define GLM_COMPILER_VC2005 0x01000010
#define GLM_COMPILER_VC2008 0x01000020
#define GLM_COMPILER_VC2010 0x01000040
// GCC defines
#define GLM_COMPILER_GCC 0x02000000
#define GLM_COMPILER_GCC28 0x02000020 // unsupported
#define GLM_COMPILER_GCC29 0x02000040 // unsupported
#define GLM_COMPILER_GCC30 0x02000080 // unsupported
#define GLM_COMPILER_GCC31 0x02000100 // unsupported
#define GLM_COMPILER_GCC32 0x02000200
#define GLM_COMPILER_GCC33 0x02000400
#define GLM_COMPILER_GCC34 0x02000800
#define GLM_COMPILER_GCC35 0x02001000
#define GLM_COMPILER_GCC40 0x02002000
#define GLM_COMPILER_GCC41 0x02004000
#define GLM_COMPILER_GCC42 0x02008000
#define GLM_COMPILER_GCC43 0x02010000
#define GLM_COMPILER_GCC44 0x02020000
#define GLM_COMPILER_GCC45 0x02040000
#define GLM_COMPILER_GCC46 0x02080000
#define GLM_COMPILER_GCC50 0x0210000
#define GLM_COMPILER_GCC32 0x02000040
#define GLM_COMPILER_GCC33 0x02000080
#define GLM_COMPILER_GCC34 0x02000100
#define GLM_COMPILER_GCC35 0x02000200
#define GLM_COMPILER_GCC40 0x02000400
#define GLM_COMPILER_GCC41 0x02000800
#define GLM_COMPILER_GCC42 0x02001000
#define GLM_COMPILER_GCC43 0x02002000
#define GLM_COMPILER_GCC44 0x02004000
#define GLM_COMPILER_GCC45 0x02008000
#define GLM_COMPILER_GCC46 0x02010000
#define GLM_COMPILER_GCC50 0x02020000
// Borland C++ defines. How to identify BC?
#define GLM_COMPILER_BC 0x03000000
#define GLM_COMPILER_BCB4 0x03000400
#define GLM_COMPILER_BCB5 0x03000800
#define GLM_COMPILER_BCB6 0x03001000
//#define GLM_COMPILER_BCBX 0x03002000 // What's the version value?
#define GLM_COMPILER_BCB2009 0x03004000
#define GLM_MODEL_32 0x00000010
#define GLM_MODEL_64 0x00000020
#ifndef GLM_COMPILER
// CodeWarrior
#define GLM_COMPILER_CODEWARRIOR 0x04000000
/////////////////
// Visual C++ //
@@ -111,38 +109,22 @@
#define GLM_MODEL GLM_MODEL_64
#else
#define GLM_MODEL GLM_MODEL_32
#endif//
#if _MSC_VER == 1200
#define GLM_COMPILER GLM_COMPILER_VC60
#endif
#if _MSC_VER == 1300
#define GLM_COMPILER GLM_COMPILER_VC70
#endif
#if _MSC_VER == 1310
#define GLM_COMPILER GLM_COMPILER_VC71
#endif
#endif//_WIN64
#if _MSC_VER == 1400
#define GLM_COMPILER GLM_COMPILER_VC80
#endif
#if _MSC_VER == 1500
#define GLM_COMPILER GLM_COMPILER_VC90
#endif
#if _MSC_VER == 1600
#define GLM_COMPILER GLM_COMPILER_VC2005
#elif _MSC_VER == 1500
#define GLM_COMPILER GLM_COMPILER_VC2008
#elif _MSC_VER == 1600
#define GLM_COMPILER GLM_COMPILER_VC2010
#endif
#else//_MSC_VER
#define GLM_COMPILER GLM_COMPILER_VC
#endif//_MSC_VER
//////////////////
// GCC defines //
#ifdef __GNUC__
#elif defined(__GNUC__)
#if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__)
#define GLM_MODEL GLM_MODEL_64
@@ -150,74 +132,54 @@
#define GLM_MODEL GLM_MODEL_32
#endif//
#if (__GNUC__ == 2) && (__GNUC_MINOR__ == 8)
#error "GCC 2.8x isn't supported"
#define GLM_COMPILER GLM_COMPILER_GCC28
#endif
#if (__GNUC__ == 2) && (__GNUC_MINOR__ == 9)
#error "GCC 2.9x isn't supported"
#define GLM_COMPILER GLM_COMPILER_GCC29
#endif
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 0)
#error "GCC 3.0 isn't supported"
#define GLM_COMPILER GLM_COMPILER_GCC30
#endif
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 1)
#error "GCC 3.1 isn't supported"
#define GLM_COMPILER GLM_COMPILER_GCC31
#endif
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)
#define GLM_COMPILER GLM_COMPILER_GCC32
#endif
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
#elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
#define GLM_COMPILER GLM_COMPILER_GCC33
#endif
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
#elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
#define GLM_COMPILER GLM_COMPILER_GCC34
#endif
#if (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
#elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
#define GLM_COMPILER GLM_COMPILER_GCC35
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)
#define GLM_COMPILER GLM_COMPILER_GCC40
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)
#define GLM_COMPILER GLM_COMPILER_GCC41
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
#define GLM_COMPILER GLM_COMPILER_GCC42
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
#define GLM_COMPILER GLM_COMPILER_GCC43
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
#define GLM_COMPILER GLM_COMPILER_GCC44
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
#define GLM_COMPILER GLM_COMPILER_GCC45
#endif
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
#define GLM_COMPILER GLM_COMPILER_GCC46
#endif
#if (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
#elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
#define GLM_COMPILER GLM_COMPILER_GCC50
#else
#define GLM_COMPILER GLM_COMPILER_GCC
#endif
#elif defined(_BORLANDC_)
#if defined(VER125)
#define GLM_COMPILER GLM_COMPILER_BCB4
#elif defined(VER130)
#define GLM_COMPILER GLM_COMPILER_BCB5
#elif defined(VER140)
#define GLM_COMPILER GLM_COMPILER_BCB6
#elif defined(VER200)
#define GLM_COMPILER GLM_COMPILER_BCB2009
#else
#define GLM_COMPILER GLM_COMPILER_BC
#endif
#elif defined(__MWERKS__)
#define GLM_COMPILER GLM_COMPILER_CODEWARRIOR
#else
#define GLM_COMPILER GLM_COMPILER_UNKNOWNED
#endif//__GNUC__
#endif//GLM_COMPILER
@@ -248,100 +210,6 @@
# endif//GLM_MODEL
#endif//GLM_MESSAGE
///////////////////////////////////////////////////////////////////////////////////////////////////
// Compatibility
#define GLM_COMPATIBILITY_DEFAULT 0
#define GLM_COMPATIBILITY_STRICT 1
//! By default:
//#define GLM_COMPATIBILITY GLM_COMPATIBILITY_DEFAULT
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE & (GLM_MESSAGE_SETUP | GLM_MESSAGE_NOTIFICATION)))
# if(!defined(GLM_COMPATIBILITY) || (defined(GLM_COMPATIBILITY) && (GLM_COMPATIBILITY == GLM_COMPATIBILITY_STRICT)))
#
# elif(defined(GLM_COMPATIBILITY) && (GLM_COMPATIBILITY == GLM_COMPATIBILITY_STRICT))
# pragma message("GLM message: compatibility strict")
# endif//GLM_AUTO_CAST
#endif//GLM_MESSAGE
///////////////////////////////////////////////////////////////////////////////////////////////////
// External dependencies
#define GLM_DEPENDENCE_NONE 0x00000000
#define GLM_DEPENDENCE_GLEW 0x00000001
#define GLM_DEPENDENCE_GLEE 0x00000002
#define GLM_DEPENDENCE_GL 0x00000004
#define GLM_DEPENDENCE_GL3 0x00000008
#define GLM_DEPENDENCE_BOOST 0x00000010
#define GLM_DEPENDENCE_STL 0x00000020
#define GLM_DEPENDENCE_TR1 0x00000040
#define GLM_DEPENDENCE_TR2 0x00000080
//! By default:
// #define GLM_DEPENDENCE GLM_DEPENDENCE_NONE
#if(defined(GLM_DEPENDENCE) && (GLM_DEPENDENCE & GLM_DEPENDENCE_GLEW))
#include <GL/glew.hpp>
#elif(defined(GLM_DEPENDENCE) && (GLM_DEPENDENCE & GLM_DEPENDENCE_GLEE))
#include <GL/GLee.hpp>
#elif(defined(GLM_DEPENDENCE) && (GLM_DEPENDENCE & GLM_DEPENDENCE_GL))
#include <GL/gl.h>
#elif(defined(GLM_DEPENDENCE) && (GLM_DEPENDENCE & GLM_DEPENDENCE_GL3))
#include <GL3/gl3.h>
#endif//GLM_DEPENDENCE
#if(defined(GLM_DEPENDENCE) && (GLM_DEPENDENCE & GLM_DEPENDENCE_BOOST))
#include <boost/static_assert.hpp>
#endif//GLM_DEPENDENCE
#if(defined(GLM_DEPENDENCE) && (GLM_DEPENDENCE & GLM_DEPENDENCE_BOOST)) || defined(BOOST_STATIC_ASSERT)
#define GLM_STATIC_ASSERT(x) BOOST_STATIC_ASSERT(x)
#else
#define GLM_STATIC_ASSERT(x) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
#endif//GLM_DEPENDENCE
///////////////////////////////////////////////////////////////////////////////////////////////////
// Cast
#define GLM_CAST_NONE 0x00000000
#define GLM_CAST_DIRECTX_9 0x00000001
#define GLM_CAST_DIRECTX_10 0x00000002
#define GLM_CAST_NVSG 0x00000004
#define GLM_CAST_WILD_MAGIC_3 0x00000008
#define GLM_CAST_WILD_MAGIC_4 0x00000010
#define GLM_CAST_PHYSX 0x00000020
#define GLM_CAST_ODE 0x00000040
//! By default:
// #define GLM_CAST GLM_CAST_NONE
// #define GLM_CAST_EXT GLM_CAST_NONE
///////////////////////////////////////////////////////////////////////////////////////////////////
// Automatic cast
// glColor4fv(glm::vec4(1.0))
//! By default:
// #define GLM_AUTO_CAST GLM_ENABLE
// GLM_AUTO_CAST isn't defined by defaut but also enable by default with GLM 0.7.x
// Disable GLM_AUTO_CAST by default on Visual C++ 7.1
#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER <= GLM_COMPILER_VC71)
# if(defined(GLM_AUTO_CAST) || (GLM_AUTO_CAST == GLM_ENABLE))
# error "GLM_AUTO_CAST isn't supported by Visual C++ 7.1 and below"
# else
# define GLM_AUTO_CAST GLM_DISABLE
# endif//GLM_AUTO_CAST
#endif//GLM_COMPILER
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE & (GLM_MESSAGE_SETUP | GLM_MESSAGE_NOTIFICATION)))
# if(!defined(GLM_AUTO_CAST) || (defined(GLM_AUTO_CAST) && (GLM_AUTO_CAST == GLM_ENABLE)))
# pragma message("GLM message: Auto cast enabled")
# else
# pragma message("GLM message: Auto cast disabled")
# endif//GLM_AUTO_CAST
#endif//GLM_MESSAGE
///////////////////////////////////////////////////////////////////////////////////////////////////
// Swizzle operators
@@ -364,6 +232,28 @@
# endif//GLM_SWIZZLE
#endif//GLM_MESSAGE
///////////////////////////////////////////////////////////////////////////////////////////////////
// Use options
// To disable multiple vector component names access.
// GLM_USE_ONLY_XYZW
// To use anonymous union to provide multiple component names access for class valType. Visual C++ only.
// GLM_USE_ANONYMOUS_UNION
#if(defined(GLM_USE_ANONYMOUS_UNION) && !(GLM_COMPILER & GLM_COMPILER_VC))
#error "GLM_USE_ANONYMOUS_UNION is defined to use anonymous union implementation of vector types. Anonymous unions can't be used with GCC."
#endif//GLM_USE_ANONYMOUS_UNION
///////////////////////////////////////////////////////////////////////////////////////////////////
// Static assert
#if(defined(BOOST_STATIC_ASSERT))
#define GLM_STATIC_ASSERT(x) BOOST_STATIC_ASSERT(x)
#else
#define GLM_STATIC_ASSERT(x) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
#endif//GLM_DEPENDENCE
///////////////////////////////////////////////////////////////////////////////////////////////////
#endif//glm_setup