Merge branch '0.9.2' into 0.9.3

This commit is contained in:
Christophe Riccio 2011-09-13 12:56:38 +01:00
commit dd2f8e1a97

View File

@ -1312,6 +1312,7 @@ namespace detail
isnan(x.w)); isnan(x.w));
} }
template <>
GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value)
{ {
union union
@ -1324,10 +1325,10 @@ namespace detail
return fi.i; return fi.i;
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec2<int> floatBitsToInt GLM_FUNC_QUALIFIER detail::tvec2<int> floatBitsToInt
( (
detail::tvec2<T> const & value detail::tvec2<float> const & value
) )
{ {
return detail::tvec2<int>( return detail::tvec2<int>(
@ -1335,28 +1336,32 @@ namespace detail
floatBitsToInt(value.y)); floatBitsToInt(value.y));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec3<int> floatBitsToInt GLM_FUNC_QUALIFIER detail::tvec3<int> floatBitsToInt
( (
detail::tvec3<T> const & value detail::tvec3<float> const & value
) )
{ {
return detail::tvec3<int>( return detail::tvec3<int>(
floatBitsToInt(value.x), floatBitsToInt(value.x),
floatBitsToInt(value.y)); floatBitsToInt(value.y),
floatBitsToInt(value.z));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec4<int> floatBitsToInt GLM_FUNC_QUALIFIER detail::tvec4<int> floatBitsToInt
( (
detail::tvec4<T> const & value detail::tvec4<float> const & value
) )
{ {
return detail::tvec4<int>( return detail::tvec4<int>(
floatBitsToInt(value.x), floatBitsToInt(value.x),
floatBitsToInt(value.y)); floatBitsToInt(value.y),
floatBitsToInt(value.z),
floatBitsToInt(value.w));
} }
template<>
GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value)
{ {
union union
@ -1369,10 +1374,10 @@ namespace detail
return fu.u; return fu.u;
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec2<uint> floatBitsToUint GLM_FUNC_QUALIFIER detail::tvec2<uint> floatBitsToUint
( (
detail::tvec2<T> const & value detail::tvec2<float> const & value
) )
{ {
return detail::tvec2<uint>( return detail::tvec2<uint>(
@ -1380,10 +1385,10 @@ namespace detail
floatBitsToUint(value.y)); floatBitsToUint(value.y));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec3<uint> floatBitsToUint GLM_FUNC_QUALIFIER detail::tvec3<uint> floatBitsToUint
( (
detail::tvec3<T> const & value detail::tvec3<float> const & value
) )
{ {
return detail::tvec3<uint>( return detail::tvec3<uint>(
@ -1392,10 +1397,10 @@ namespace detail
floatBitsToUint(value.z)); floatBitsToUint(value.z));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec4<uint> floatBitsToUint GLM_FUNC_QUALIFIER detail::tvec4<uint> floatBitsToUint
( (
detail::tvec4<T> const & value detail::tvec4<float> const & value
) )
{ {
return detail::tvec4<uint>( return detail::tvec4<uint>(
@ -1417,10 +1422,10 @@ namespace detail
return fi.f; return fi.f;
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec2<float> intBitsToFloat GLM_FUNC_QUALIFIER detail::tvec2<float> intBitsToFloat
( (
detail::tvec2<T> const & value detail::tvec2<int> const & value
) )
{ {
return detail::tvec2<float>( return detail::tvec2<float>(
@ -1428,10 +1433,10 @@ namespace detail
intBitsToFloat(value.y)); intBitsToFloat(value.y));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec3<float> intBitsToFloat GLM_FUNC_QUALIFIER detail::tvec3<float> intBitsToFloat
( (
detail::tvec3<T> const & value detail::tvec3<int> const & value
) )
{ {
return detail::tvec3<float>( return detail::tvec3<float>(
@ -1440,7 +1445,7 @@ namespace detail
intBitsToFloat(value.z)); intBitsToFloat(value.z));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec4<float> intBitsToFloat GLM_FUNC_QUALIFIER detail::tvec4<float> intBitsToFloat
( (
detail::tvec4<T> const & value detail::tvec4<T> const & value
@ -1453,6 +1458,7 @@ namespace detail
intBitsToFloat(value.w)); intBitsToFloat(value.w));
} }
template<>
GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value)
{ {
union union
@ -1465,10 +1471,10 @@ namespace detail
return fu.f; return fu.f;
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec2<float> uintBitsToFloat GLM_FUNC_QUALIFIER detail::tvec2<float> uintBitsToFloat
( (
detail::tvec2<T> const & value detail::tvec2<uint> const & value
) )
{ {
return detail::tvec2<float>( return detail::tvec2<float>(
@ -1476,10 +1482,10 @@ namespace detail
uintBitsToFloat(value.y)); uintBitsToFloat(value.y));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec3<float> uintBitsToFloat GLM_FUNC_QUALIFIER detail::tvec3<float> uintBitsToFloat
( (
detail::tvec3<T> const & value detail::tvec3<uint> const & value
) )
{ {
return detail::tvec3<float>( return detail::tvec3<float>(
@ -1488,10 +1494,10 @@ namespace detail
uintBitsToFloat(value.z)); uintBitsToFloat(value.z));
} }
template <typename T> template <>
GLM_FUNC_QUALIFIER detail::tvec4<float> uintBitsToFloat GLM_FUNC_QUALIFIER detail::tvec4<float> uintBitsToFloat
( (
detail::tvec4<T> const & value detail::tvec4<uint> const & value
) )
{ {
return detail::tvec4<float>( return detail::tvec4<float>(