Merge branch '0.9.0' into intrinsic

This commit is contained in:
Christophe Riccio
2010-05-25 12:32:56 +01:00
324 changed files with 2274 additions and 50409 deletions

View File

@@ -13,10 +13,6 @@
#include "../setup.hpp"
#include <cassert>
//#define valType typename genType::value_type
//#define valType_cref typename genType::value_type const &
//#define genType_cref typename genType const &
namespace glm{
namespace detail{
@@ -152,8 +148,8 @@ namespace detail{
{
enum is_int_enum
{
YES = 0,
NO = 1
_YES = 0,
_NO = 1
};
};
@@ -163,8 +159,8 @@ namespace detail{
{ \
enum is_int_enum \
{ \
YES = 1, \
NO = 0 \
_YES = 1, \
_NO = 0 \
}; \
}
@@ -176,8 +172,8 @@ namespace detail{
{
enum is_uint_enum
{
YES = 0,
NO = 1
_YES = 0,
_NO = 1
};
};
@@ -187,8 +183,8 @@ namespace detail{
{ \
enum is_uint_enum \
{ \
YES = 1, \
NO = 0 \
_YES = 1, \
_NO = 0 \
}; \
}
@@ -202,8 +198,8 @@ namespace detail{
{
enum is_float_enum
{
YES = 0,
NO = 1
_YES = 0,
_NO = 1
};
};
@@ -213,8 +209,8 @@ namespace detail{
{ \
enum is_float_enum \
{ \
YES = 1, \
NO = 0 \
_YES = 1, \
_NO = 0 \
}; \
}
@@ -226,8 +222,8 @@ namespace detail{
{
enum is_bool_enum
{
YES = 0,
NO = 1
_YES = 0,
_NO = 1
};
};
@@ -236,8 +232,8 @@ namespace detail{
{
enum is_bool_enum
{
YES = 1,
NO = 0
_YES = 1,
_NO = 0
};
};
@@ -249,8 +245,8 @@ namespace detail{
{
enum is_vector_enum
{
YES = 0,
NO = 1
_YES = 0,
_NO = 1
};
};
@@ -260,8 +256,8 @@ namespace detail{
{ \
enum is_vector_enum \
{ \
YES = 1, \
NO = 0 \
_YES = 1, \
_NO = 0 \
}; \
}
@@ -273,8 +269,8 @@ namespace detail{
{
enum is_matrix_enum
{
YES = 0,
NO = 1
_YES = 0,
_NO = 1
};
};
@@ -284,8 +280,8 @@ namespace detail{
{ \
enum is_matrix_enum \
{ \
YES = 1, \
NO = 0 \
_YES = 1, \
_NO = 0 \
}; \
}
@@ -297,10 +293,10 @@ namespace detail{
{
enum type_enum
{
is_float = is_float<T>::YES,
is_int = is_int<T>::YES,
is_uint = is_uint<T>::YES,
is_bool = is_bool<T>::YES
is_float = is_float<T>::_YES,
is_int = is_int<T>::_YES,
is_uint = is_uint<T>::_YES,
is_bool = is_bool<T>::_YES
};
};

View File

@@ -833,7 +833,7 @@ namespace glm
// detail::type<genTypeU>::is_float);
//return x + a * (y - x);
return genTypeU(x) + a * genTypeU(y - x);
return genTypeT(genTypeU(x) + a * genTypeU(y - x));
}
template <typename valTypeA, typename valTypeB>

View File

@@ -2,7 +2,7 @@
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2005-01-14
// Updated : 2009-05-01
// Updated : 2010-05-30
// Licence : This source is under MIT License
// File : glm/glm.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -11,13 +11,19 @@
*
* OpenGL Mathematics (GLM) is a C++ mathematics library for 3D applications based on the OpenGL Shading Language (GLSL) specification.
*
* The goal of the project is to provide to 3D programmers math classes and functions that miss in C++ when we use to program with GLSL or any high level GPU language. With GLM, the idea is to have a library that works the same way that GLSL which imply a strict following of GLSL specification for the implementation.
* GLM provides 3D programmers with math classes and functions that are similar to GLSL or any high level GPU programming language. The idea is to have a library that has identical naming conventions and functionalities than GLSL so that when developers know GLSL, they know how to use GLM.
*
* However, this project isn't limited by GLSL features. An extension system based on GLSL extensions development conventions allows to extend GLSL capabilities.
* However, this project isn't limited by GLSL features. An extension system, based on the GLSL extension conventions, allows extended capabilities.
*
* GLM is release under MIT license and available for all version of GCC from version 3.4 and Visual Studio from version 8.0 as a platform independent library.
* This library can be used with OpenGL but also for software rendering (Raytracing / Rasterisation), image processing and as much contexts as a simple math library could be used for.
*
* Any feedback is welcome, please send them to g.truc.creation[NO_SPAM_THANKS]gmail.com.
* GLM is written as a platform independent library and supports the following compilers:
* - GNU GCC 3.4 and higher
* - Microsoft Visual Studio 8.0 and higher
*
* The source code is under the MIT licence.
*
* Any feedback is welcome and can be sent to g.truc.creation[at]gmail.com.
*
*/
@@ -58,22 +64,7 @@ namespace glm
//! from section 4.1.2 Booleans, 4.1.3 Integers section, 4.1.4 Floats section,
//! 4.1.5 Vectors and section 4.1.6 Matrices of GLSL 1.30.8 specification.
//! This namespace resolves precision qualifier define in section 4.5 of GLSL 1.30.8 specification.
namespace type
{
/*
//! Scalar types from section 4.1.2 Booleans, 4.1.3 Integers and 4.1.4 Floats of GLSL 1.30.8 specification.
//! This namespace is included in glm namespace.
namespace scalar{}
//! Vector types from section 4.1.5 of GLSL 1.30.8 specification.
//! This namespace is included in glm namespace.
namespace vector{}
//! Matrix types from section 4.1.6 of GLSL 1.30.8 specification.
//! This namespace is included in glm namespace.
namespace matrix{}
*/
}
namespace type{}
//! Some of the functions defined in section 8 Built-in Functions of GLSL 1.30.8 specification.
//! Angle and trigonometry, exponential, common, geometric, matrix and vector relational functions.
@@ -109,44 +100,22 @@ namespace glm
#include "./core/func_integer.hpp"
#include "./core/func_noise.hpp"
#include "./core/_swizzle.hpp"
//#include "./core/_xref2.hpp"
//#include "./core/_xref3.hpp"
//#include "./core/_xref4.hpp"
#if(defined(GLM_MESSAGE) && (GLM_MESSAGE & (GLM_MESSAGE_CORE | GLM_MESSAGE_NOTIFICATION)))
# pragma message("GLM message: Core library included")
#endif//GLM_MESSAGE
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
#define GLM_DEPRECATED __declspec(deprecated)
#define GLM_RESTRICT __restrict
#define GLM_ALIGN(x) __declspec(align(x))
//#define aligned(x) __declspec(align(x)) struct
# define GLM_DEPRECATED __declspec(deprecated)
# define GLM_RESTRICT __restrict
# define GLM_ALIGN(x) __declspec(align(x))
//# define aligned(x) __declspec(align(x)) struct
#else
#define GLM_DEPRECATED
#define GLM_RESTRICT
#define GLM_ALIGN(x)
# define GLM_DEPRECATED
# define GLM_RESTRICT
# define GLM_ALIGN(x)
#endif//GLM_COMPILER
////////////////////
// check type sizes
#ifndef GLM_STATIC_ASSERT_NULL

View File

@@ -25,13 +25,13 @@ inline tvec2<thalf>::size_type tvec2<thalf>::value_size()
inline thalf & tvec2<thalf>::operator[](tvec2<thalf>::size_type i)
{
assert(i >= tvec2<thalf>::size_type(0) && i < tvec2<thalf>::value_size());
assert(/*i >= tvec2<thalf>::size_type(0) && */i < tvec2<thalf>::value_size());
return (&x)[i];
}
inline thalf const & tvec2<thalf>::operator[](tvec2<thalf>::size_type i) const
{
assert(i >= tvec2<thalf>::size_type(0) && i < tvec2<thalf>::value_size());
assert(/*i >= tvec2<thalf>::size_type(0) && */i < tvec2<thalf>::value_size());
return (&x)[i];
}
@@ -296,7 +296,7 @@ inline thalf & tvec3<thalf>::operator[]
tvec3<thalf>::size_type i
)
{
assert(i >= tvec3<thalf>::size_type(0) && i < tvec3<thalf>::value_size());
assert(/*i >= tvec3<thalf>::size_type(0) &&*/ i < tvec3<thalf>::value_size());
return (&x)[i];
}
@@ -306,7 +306,7 @@ inline thalf const & tvec3<thalf>::operator[]
tvec3<thalf>::size_type i
) const
{
assert(i >= tvec3<thalf>::size_type(0) && i < tvec3<thalf>::value_size());
assert(/*i >= tvec3<thalf>::size_type(0) &&*/ i < tvec3<thalf>::value_size());
return (&x)[i];
}
@@ -608,7 +608,7 @@ inline thalf & tvec4<thalf>::operator[]
tvec4<thalf>::size_type i
)
{
assert(i >= tvec4<thalf>::size_type(0) && i < tvec4<thalf>::value_size());
assert(/*i >= tvec4<thalf>::size_type(0) && */i < tvec4<thalf>::value_size());
return (&x)[i];
}
@@ -618,7 +618,7 @@ inline thalf const & tvec4<thalf>::operator[]
tvec4<thalf>::size_type i
) const
{
assert(i >= tvec4<thalf>::size_type(0) && i < tvec4<thalf>::value_size());
assert(/*i >= tvec4<thalf>::size_type(0) && */i < tvec4<thalf>::value_size());
return (&x)[i];
}

View File

@@ -16,8 +16,8 @@
#define GLM_VERSION 90
#define GLM_VERSION_MAJOR 0
#define GLM_VERSION_MINOR 9
#define GLM_VERSION_PATCH B
#define GLM_VERSION_REVISION 2
#define GLM_VERSION_PATCH 0
#define GLM_VERSION_REVISION 0
///////////////////////////////////////////////////////////////////////////////////////////////////
// Common values