Fixed merge conflicts

This commit is contained in:
Christophe Riccio 2013-08-12 22:44:31 +02:00
commit bcbffbea58
6 changed files with 121 additions and 100 deletions

View File

@ -60,8 +60,8 @@ namespace detail
typedef T value_type;
protected:
value_type& elem (size_t i) { return (reinterpret_cast<value_type*>(_buffer))[i]; }
const value_type& elem (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }
GLM_FUNC_QUALIFIER value_type& elem (size_t i) { return (reinterpret_cast<value_type*>(_buffer))[i]; }
GLM_FUNC_QUALIFIER const value_type& elem (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }
// Use an opaque buffer to *ensure* the compiler doesn't call a constructor.
// The size 1 buffer is assumed to aligned to the actual members so that the
@ -77,19 +77,19 @@ namespace detail
template <typename T, precision P, typename V, int E0, int E1>
struct _swizzle_base1<T, P, V,E0,E1,-1,-2,2> : public _swizzle_base0<T, 2>
{
V operator ()() const { return V(this->elem(E0), this->elem(E1)); }
GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1)); }
};
template <typename T, precision P, typename V, int E0, int E1, int E2>
struct _swizzle_base1<T, P, V,E0,E1,E2,-1,3> : public _swizzle_base0<T, 3>
{
V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }
GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }
};
template <typename T, precision P, typename V, int E0, int E1, int E2, int E3>
struct _swizzle_base1<T, P, V,E0,E1,E2,E3,4> : public _swizzle_base0<T, 4>
{
V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
};
// Internal class for implementing swizzle operators
@ -110,67 +110,73 @@ namespace detail
typedef VecType vec_type;
typedef ValueType value_type;
_swizzle_base2& operator= (const ValueType& t)
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t)
{
for (int i = 0; i < N; ++i)
(*this)[i] = t;
return *this;
}
_swizzle_base2& operator= (const VecType& that)
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that)
{
struct op {
void operator() (value_type& e, value_type& t) { e = t; }
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; }
};
_apply_op(that, op());
return *this;
}
void operator -= (const VecType& that)
GLM_FUNC_QUALIFIER void operator -= (const VecType& that)
{
struct op {
void operator() (value_type& e, value_type& t) { e -= t; }
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; }
};
_apply_op(that, op());
}
void operator += (const VecType& that)
GLM_FUNC_QUALIFIER void operator += (const VecType& that)
{
struct op {
void operator() (value_type& e, value_type& t) { e += t; }
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; }
};
_apply_op(that, op());
}
void operator *= (const VecType& that)
GLM_FUNC_QUALIFIER void operator *= (const VecType& that)
{
struct op {
void operator() (value_type& e, value_type& t) { e *= t; }
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; }
};
_apply_op(that, op());
}
void operator /= (const VecType& that)
GLM_FUNC_QUALIFIER void operator /= (const VecType& that)
{
struct op {
void operator() (value_type& e, value_type& t) { e /= t; }
GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; }
};
_apply_op(that, op());
}
value_type& operator[] (size_t i)
GLM_FUNC_QUALIFIER value_type& operator[] (size_t i)
{
static const int offset_dst[4] = { E0, E1, E2, E3 };
#ifndef __CUDA_ARCH__
static
#endif
const int offset_dst[4] = { E0, E1, E2, E3 };
return this->elem(offset_dst[i]);
}
value_type operator[] (size_t i) const
GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const
{
static const int offset_dst[4] = { E0, E1, E2, E3 };
#ifndef __CUDA_ARCH__
static
#endif
const int offset_dst[4] = { E0, E1, E2, E3 };
return this->elem(offset_dst[i]);
}
protected:
template <typename T>
void _apply_op(const VecType& that, T op)
GLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op)
{
// Make a copy of the data in this == &that.
// The copier should optimize out the copy in cases where the function is
@ -191,11 +197,14 @@ namespace detail
typedef ValueType value_type;
struct Stub {};
_swizzle_base2& operator= (Stub const &) { return *this; }
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; }
value_type operator[] (size_t i) const
GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const
{
static const int offset_dst[4] = { E0, E1, E2, E3 };
#ifndef __CUDA_ARCH__
static
#endif
const int offset_dst[4] = { E0, E1, E2, E3 };
return this->elem(offset_dst[i]);
}
};
@ -207,7 +216,7 @@ namespace detail
using base_type::operator=;
operator VecType () const { return (*this)(); }
GLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); }
};
//
@ -223,17 +232,17 @@ namespace detail
//
#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
_GLM_SWIZZLE_TEMPLATE2 \
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
{ \
return a() OPERAND b(); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \
GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \
{ \
return a() OPERAND b; \
} \
_GLM_SWIZZLE_TEMPLATE1 \
V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \
GLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return a OPERAND b(); \
}
@ -243,12 +252,12 @@ namespace detail
//
#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
_GLM_SWIZZLE_TEMPLATE1 \
V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \
GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \
{ \
return a() OPERAND b; \
} \
_GLM_SWIZZLE_TEMPLATE1 \
V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \
GLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return a OPERAND b(); \
}
@ -258,7 +267,7 @@ namespace detail
//
#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \
{ \
return FUNCTION(a()); \
}
@ -268,22 +277,22 @@ namespace detail
//
#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \
_GLM_SWIZZLE_TEMPLATE2 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \
{ \
return FUNCTION(a(), b()); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return FUNCTION(a(), b()); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \
{ \
return FUNCTION(a(), b); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \
{ \
return FUNCTION(a, b()); \
}
@ -293,22 +302,22 @@ namespace detail
//
#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \
_GLM_SWIZZLE_TEMPLATE2 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \
{ \
return FUNCTION(a(), b(), c); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
{ \
return FUNCTION(a(), b(), c); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
{ \
return FUNCTION(a(), b, c); \
} \
_GLM_SWIZZLE_TEMPLATE1 \
typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \
{ \
return FUNCTION(a, b(), c); \
}

View File

@ -54,21 +54,21 @@ namespace detail
# if(GLM_COMPONENT == GLM_COMPONENT_CXXMS)
union
{
# if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y)
_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g)
_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t)
_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y)
_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g)
_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t)
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y)
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g)
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)
# endif//(defined(GLM_SWIZZLE))
struct{value_type x, y;};
struct{value_type r, g;};
struct{value_type s, t;};
struct {value_type r, g;};
struct {value_type s, t;};
struct {value_type x, y;};
# if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y)
_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g)
_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t)
_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y)
_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g)
_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t)
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y)
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g)
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)
# endif//(defined(GLM_SWIZZLE))
};
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
union {value_type x, r, s;};

View File

@ -54,21 +54,21 @@ namespace detail
# if(GLM_COMPONENT == GLM_COMPONENT_CXXMS)
union
{
# if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, x, y, z)
_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, r, g, b)
_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, s, t, p)
_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, x, y, z)
_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, r, g, b)
_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, s, t, p)
_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, x, y, z)
_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, r, g, b)
_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, s, t, p)
# endif//(defined(GLM_SWIZZLE))
struct{value_type x, y, z;};
struct{value_type r, g, b;};
struct{value_type s, t, p;};
struct {value_type r, g, b;};
struct {value_type s, t, p;};
struct {value_type x, y, z;};
# if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, x, y, z)
_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, r, g, b)
_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, s, t, p)
_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, x, y, z)
_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, r, g, b)
_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, s, t, p)
_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, x, y, z)
_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, r, g, b)
_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, s, t, p)
# endif//(defined(GLM_SWIZZLE))
};
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
union {value_type x, r, s;};

View File

@ -54,6 +54,10 @@ namespace detail
# if(GLM_COMPONENT == GLM_COMPONENT_CXXMS)
union
{
struct {value_type r, g, b, a;};
struct {value_type s, t, p, q;};
struct {value_type x, y, z, w;};
# if(defined(GLM_SWIZZLE))
_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)
_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a)
@ -65,10 +69,6 @@ namespace detail
_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a)
_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q)
# endif//(defined(GLM_SWIZZLE))
struct {value_type r, g, b, a;};
struct {value_type s, t, p, q;};
struct {value_type x, y, z, w;};
};
# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98)
union {value_type x, r, s;};

View File

@ -31,7 +31,7 @@ namespace glm
/// @addtogroup gtc_type_ptr
/// @{
/// Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the vector input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -42,7 +42,7 @@ namespace glm
return &(vec.x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the vector input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -53,7 +53,7 @@ namespace glm
return &(vec.x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the vector input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -64,7 +64,7 @@ namespace glm
return &(vec.x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the vector input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -75,7 +75,7 @@ namespace glm
return &(vec.x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the vector input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -86,7 +86,7 @@ namespace glm
return &(vec.x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the vector input.
//! From GLM_GTC_type_ptr extension.
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -97,7 +97,7 @@ namespace glm
return &(vec.x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -108,7 +108,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -119,7 +119,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -130,7 +130,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -141,7 +141,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -152,7 +152,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
//! From GLM_GTC_type_ptr extension.
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -163,7 +163,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -174,7 +174,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -185,7 +185,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -196,7 +196,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -207,7 +207,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -218,7 +218,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -229,7 +229,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -240,7 +240,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -251,7 +251,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -262,7 +262,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr
@ -273,7 +273,7 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
/// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -284,7 +284,15 @@ namespace glm
return &(mat[0].x);
}
//! Return the constant address to the data of the input parameter.
//! Return the address to the data of the matrix input.
/// @see gtc_type_ptr
template<typename T>
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T> & mat)
{
return &(mat[0].x);
}
/// Return the constant address to the data of the quaternion input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T const * value_ptr
@ -294,13 +302,16 @@ namespace glm
{
return &(q[0]);
}
//! Get the address of the matrix content.
//! Return the address to the data of the quaternion input.
/// @see gtc_type_ptr
template<typename T, precision P>
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T, P> & mat)
template<typename T>
GLM_FUNC_QUALIFIER T * value_ptr
(
detail::tquat<T> & q
)
{
return &(mat[0].x);
return &(q[0]);
}
//! Build a vector from a pointer.

View File

@ -57,6 +57,7 @@ GLM 0.9.4.5: 2013-06-XX
--------------------------------------------------------------------------------
- Fixed inclusion of intrinsics in "pure" mode #92
- Fixed language detection on GCC when the C++0x mode isn't enabled #95
- Added missing value_ptr for quaternions #99
================================================================================
GLM 0.9.4.4: 2013-05-29