Clean up
This commit is contained in:
parent
dc979ddfaf
commit
b0325a9714
@ -114,7 +114,7 @@ namespace glm
|
||||
typedef detail::tmat4x3<lowp_uint> lowp_umat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
||||
#if(GLM_PRECISION & GLM_PRECISION_HIGHP_INT)
|
||||
#if(defined(GLM_PRECISION) && (GLM_PRECISION & GLM_PRECISION_HIGHP_INT))
|
||||
typedef highp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
@ -129,7 +129,7 @@ namespace glm
|
||||
typedef highp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
||||
#elif(GLM_PRECISION & GLM_PRECISION_LOWP_INT)
|
||||
#elif(defined(GLM_PRECISION) && (GLM_PRECISION & GLM_PRECISION_LOWP_INT))
|
||||
typedef lowp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
@ -143,7 +143,7 @@ namespace glm
|
||||
typedef lowp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
||||
#else //if(GLM_PRECISION & GLM_PRECISION_MEDIUMP_INT)
|
||||
#else //if(defined(GLM_PRECISION) && (GLM_PRECISION & GLM_PRECISION_MEDIUMP_INT))
|
||||
typedef mediump_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
@ -158,7 +158,7 @@ namespace glm
|
||||
typedef mediump_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
#if(GLM_PRECISION & GLM_PRECISION_HIGHP_UINT)
|
||||
#if(defined(GLM_PRECISION) && (GLM_PRECISION & GLM_PRECISION_HIGHP_UINT))
|
||||
typedef highp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
@ -172,7 +172,7 @@ namespace glm
|
||||
typedef highp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef highp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
||||
#elif(GLM_PRECISION & GLM_PRECISION_LOWP_UINT)
|
||||
#elif(defined(GLM_PRECISION) && (GLM_PRECISION & GLM_PRECISION_LOWP_UINT))
|
||||
typedef lowp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
@ -186,7 +186,7 @@ namespace glm
|
||||
typedef lowp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef lowp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
||||
#else //if(GLM_PRECISION & GLM_PRECISION_MEDIUMP_UINT)
|
||||
#else //if(defined(GLM_PRECISION) && (GLM_PRECISION & GLM_PRECISION_MEDIUMP_UINT))
|
||||
typedef mediump_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
typedef mediump_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension)
|
||||
|
154
glm/setup.hpp
154
glm/setup.hpp
@ -19,23 +19,6 @@
|
||||
#define GLM_VERSION_PATCH 1
|
||||
#define GLM_VERSION_REVISION 0
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Precision
|
||||
|
||||
#define GLM_PRECISION_NONE 0x00000000
|
||||
|
||||
#define GLM_PRECISION_LOWP_FLOAT 0x00000011
|
||||
#define GLM_PRECISION_MEDIUMP_FLOAT 0x00000012
|
||||
#define GLM_PRECISION_HIGHP_FLOAT 0x00000013
|
||||
|
||||
#define GLM_PRECISION_LOWP_INT 0x00001100
|
||||
#define GLM_PRECISION_MEDIUMP_INT 0x00001200
|
||||
#define GLM_PRECISION_HIGHP_INT 0x00001300
|
||||
|
||||
#define GLM_PRECISION_LOWP_UINT 0x00110000
|
||||
#define GLM_PRECISION_MEDIUMP_UINT 0x00120000
|
||||
#define GLM_PRECISION_HIGHP_UINT 0x00130000
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Compiler
|
||||
|
||||
@ -87,13 +70,14 @@
|
||||
#define GLM_MODEL_32 0x00000010
|
||||
#define GLM_MODEL_64 0x00000020
|
||||
|
||||
#ifndef GLM_COMPILER
|
||||
|
||||
// CodeWarrior
|
||||
#define GLM_COMPILER_CODEWARRIOR 0x04000000
|
||||
|
||||
// Force generic C++ compiler
|
||||
#ifdef GLM_FORCE_COMPILER_UNKNOWNED
|
||||
# define GLM_COMPILER GLM_COMPILER_UNKNOWNED
|
||||
// Visual C++
|
||||
#ifdef _MSC_VER
|
||||
#elif defined(_MSC_VER)
|
||||
# if _MSC_VER == 900
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2
|
||||
# elif _MSC_VER == 1000
|
||||
@ -174,8 +158,6 @@
|
||||
# define GLM_COMPILER GLM_COMPILER_UNKNOWNED
|
||||
#endif
|
||||
|
||||
#endif//GLM_COMPILER
|
||||
|
||||
#ifndef GLM_COMPILER
|
||||
#error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message."
|
||||
#endif//GLM_COMPILER
|
||||
@ -234,7 +216,9 @@
|
||||
#define GLM_LANG_CXX98 1
|
||||
#define GLM_LANG_CXX0X 2
|
||||
|
||||
#if((GLM_COMPILER & GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
|
||||
#if(defined(GLM_FORCE_CXX98))
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
#elif GLM_COMPILER & GLM_COMPILER_VC2010 //_MSC_EXTENSIONS for MS language extensions
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
@ -259,9 +243,13 @@
|
||||
#define GLM_ARCH_SSE3 0x0002 | GLM_ARCH_SSE2
|
||||
#define GLM_ARCH_AVX 0x0004 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2
|
||||
|
||||
#if((GLM_COMPILER & GLM_COMPILER_VC) && defined(_M_IX86))
|
||||
# if(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
||||
# if(_M_IX86_FP == 3) //AVX
|
||||
#if(defined(GLM_FORCE_PURE))
|
||||
# define GLM_ARCH GLM_ARCH_PURE
|
||||
#elif((GLM_COMPILER & GLM_COMPILER_VC) && defined(_M_IX86))
|
||||
# if(defined(_M_CEE_PURE))
|
||||
# define GLM_ARCH GLM_ARCH_PURE
|
||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
||||
# if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
|
||||
# define GLM_ARCH GLM_ARCH_AVX //GLM_ARCH_AVX (Require SP1)
|
||||
# else
|
||||
# define GLM_ARCH GLM_ARCH_SSE3
|
||||
@ -310,76 +298,6 @@
|
||||
# endif//GLM_ARCH
|
||||
#endif//GLM_MESSAGE
|
||||
|
||||
/*
|
||||
#if(GLM_INSTRUCTION_SET != GLM_INSTRUCTION_SET_NULL)
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_MMX)
|
||||
# include <mmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_3DNOW)
|
||||
# include <mm3dnow.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE)
|
||||
# include <xmmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE2)
|
||||
# include <emmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE3)
|
||||
# include <pmmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSSE3)
|
||||
# include <tmmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_POPCNT)
|
||||
//# include <popcntintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE4A)
|
||||
//# include <ammintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE4_1)
|
||||
# include <smmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE4_2)
|
||||
# include <nmmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_AES)
|
||||
# include <wmmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_PCLMUL)
|
||||
# include <wmmintrin.h>
|
||||
# endif
|
||||
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_AVX)
|
||||
# include <immintrin.h>
|
||||
# endif
|
||||
#endif
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
#define GLM_SWIZZLE_NONE 0x00000000
|
||||
#define GLM_SWIZZLE_XYZW 0x00000002
|
||||
#define GLM_SWIZZLE_RGBA 0x00000004
|
||||
#define GLM_SWIZZLE_STQP 0x00000008
|
||||
#define GLM_SWIZZLE_FULL (GLM_SWIZZLE_XYZW | GLM_SWIZZLE_RGBA | GLM_SWIZZLE_STQP)
|
||||
|
||||
//! By default:
|
||||
// #define GLM_SWIZZLE GLM_SWIZZLE_NONE
|
||||
|
||||
#ifndef GLM_SWIZZLE
|
||||
# define GLM_SWIZZLE GLM_SWIZZLE_NONE
|
||||
#endif//GLM_SWIZZLE
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))
|
||||
# define GLM_MESSAGE_SWIZZLE_DISPLAYED
|
||||
# if !defined(GLM_SWIZZLE)|| (defined(GLM_SWIZZLE) && GLM_SWIZZLE == GLM_SWIZZLE_NONE)
|
||||
# pragma message("GLM: No swizzling operator enabled")
|
||||
# elif(defined(GLM_SWIZZLE) && GLM_SWIZZLE == GLM_SWIZZLE_FULL)
|
||||
# pragma message("GLM: Full swizzling operator enabled")
|
||||
# elif(defined(GLM_SWIZZLE) && GLM_SWIZZLE & GLM_SWIZZLE_FULL)
|
||||
# pragma message("GLM: Partial swizzling operator enabled")
|
||||
# endif//GLM_SWIZZLE
|
||||
#endif//GLM_MESSAGE
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Components
|
||||
|
||||
@ -426,6 +344,50 @@
|
||||
# define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
|
||||
#endif//GLM_LANG
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Swizzle operators
|
||||
|
||||
#define GLM_SWIZZLE_NONE 0x00000000
|
||||
#define GLM_SWIZZLE_XYZW 0x00000002
|
||||
#define GLM_SWIZZLE_RGBA 0x00000004
|
||||
#define GLM_SWIZZLE_STQP 0x00000008
|
||||
#define GLM_SWIZZLE_FULL (GLM_SWIZZLE_XYZW | GLM_SWIZZLE_RGBA | GLM_SWIZZLE_STQP)
|
||||
|
||||
//! By default:
|
||||
// #define GLM_SWIZZLE GLM_SWIZZLE_NONE
|
||||
|
||||
//#ifndef GLM_SWIZZLE
|
||||
//# define GLM_SWIZZLE GLM_SWIZZLE_NONE
|
||||
//#endif//GLM_SWIZZLE
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))
|
||||
# define GLM_MESSAGE_SWIZZLE_DISPLAYED
|
||||
# if !defined(GLM_SWIZZLE)|| (defined(GLM_SWIZZLE) && GLM_SWIZZLE == GLM_SWIZZLE_NONE)
|
||||
# pragma message("GLM: No swizzling operator enabled")
|
||||
# elif(defined(GLM_SWIZZLE) && GLM_SWIZZLE == GLM_SWIZZLE_FULL)
|
||||
# pragma message("GLM: Full swizzling operator enabled")
|
||||
# elif(defined(GLM_SWIZZLE) && GLM_SWIZZLE & GLM_SWIZZLE_FULL)
|
||||
# pragma message("GLM: Partial swizzling operator enabled")
|
||||
# endif//GLM_SWIZZLE
|
||||
#endif//GLM_MESSAGE
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Precision
|
||||
|
||||
#define GLM_PRECISION_NONE 0x00000000
|
||||
|
||||
#define GLM_PRECISION_LOWP_FLOAT 0x00000011
|
||||
#define GLM_PRECISION_MEDIUMP_FLOAT 0x00000012
|
||||
#define GLM_PRECISION_HIGHP_FLOAT 0x00000013
|
||||
|
||||
#define GLM_PRECISION_LOWP_INT 0x00001100
|
||||
#define GLM_PRECISION_MEDIUMP_INT 0x00001200
|
||||
#define GLM_PRECISION_HIGHP_INT 0x00001300
|
||||
|
||||
#define GLM_PRECISION_LOWP_UINT 0x00110000
|
||||
#define GLM_PRECISION_MEDIUMP_UINT 0x00120000
|
||||
#define GLM_PRECISION_HIGHP_UINT 0x00130000
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif//glm_setup
|
||||
|
Loading…
Reference in New Issue
Block a user