mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed build on Clang and C++11
This commit is contained in:
parent
1807881509
commit
da95e96fcf
@ -262,7 +262,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
glm::int8 Scaled(round(clamp(v ,-1.0f, 1.0f) * 127.0f));
|
glm::int8 Scaled(round(clamp(v ,-1.0f, 1.0f) * 127.0f));
|
||||||
detail::snorm1x8 Packing;
|
detail::snorm1x8 Packing;
|
||||||
Packing.x = Scaled.x;
|
Packing.data = Scaled;
|
||||||
return Packing.pack;
|
return Packing.pack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,6 +321,7 @@ namespace detail
|
|||||||
float(Packing.data.z),
|
float(Packing.data.z),
|
||||||
float(Packing.data.w));
|
float(Packing.data.w));
|
||||||
Result *= float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0
|
Result *= float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0
|
||||||
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v)
|
GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v)
|
||||||
@ -445,7 +446,9 @@ namespace detail
|
|||||||
|
|
||||||
GLM_FUNC_QUALIFIER vec3 unpackF11F11F10(uint32 const & v)
|
GLM_FUNC_QUALIFIER vec3 unpackF11F11F10(uint32 const & v)
|
||||||
{
|
{
|
||||||
|
vec3 Result;
|
||||||
|
// TODO
|
||||||
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -286,22 +286,11 @@ namespace glm
|
|||||||
|
|
||||||
//! Return the address to the data of the matrix input.
|
//! Return the address to the data of the matrix input.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T> & mat)
|
GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T, P> & mat)
|
||||||
{
|
{
|
||||||
return &(mat[0].x);
|
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 * value_ptr
|
|
||||||
(
|
|
||||||
detail::tquat<T, P> & q
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return &(q[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Return the constant address to the data of the input parameter.
|
//! Return the constant address to the data of the input parameter.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
@ -316,10 +305,10 @@ namespace glm
|
|||||||
|
|
||||||
//! Return the address to the data of the quaternion input.
|
//! Return the address to the data of the quaternion input.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr
|
GLM_FUNC_QUALIFIER T * value_ptr
|
||||||
(
|
(
|
||||||
detail::tquat<T> & q
|
detail::tquat<T, P> & q
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(q[0]);
|
return &(q[0]);
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
/// @author Christophe Riccio
|
/// @author Christophe Riccio
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <glm/gtc/packing.hpp>
|
#include <glm/gtc/packing.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
Loading…
Reference in New Issue
Block a user