Skip to content

Commit

Permalink
Update to glm 0.9.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
SaschaWillems committed Feb 25, 2016
1 parent 94f6b4a commit 07db647
Show file tree
Hide file tree
Showing 85 changed files with 3,739 additions and 3,618 deletions.
5 changes: 3 additions & 2 deletions external/glm/glm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ file(GLOB ROOT_SOURCE *.cpp)
file(GLOB ROOT_INLINE *.inl)
file(GLOB ROOT_HEADER *.hpp)
file(GLOB ROOT_TEXT ../*.txt)
file(GLOB ROOT_MD ../*.md)
file(GLOB ROOT_NAT ../util/glm.natvis)

file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
Expand All @@ -18,7 +19,7 @@ file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)

source_group("Text Files" FILES ${ROOT_TEXT})
source_group("Text Files" FILES ${ROOT_TEXT} ${ROOT_MD})
source_group("Core Files" FILES ${CORE_SOURCE})
source_group("Core Files" FILES ${CORE_INLINE})
source_group("Core Files" FILES ${CORE_HEADER})
Expand All @@ -32,7 +33,7 @@ source_group("GTX Files" FILES ${GTX_HEADER})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)

if(GLM_TEST_ENABLE)
add_executable(${NAME} ${ROOT_TEXT} ${ROOT_NAT}
add_executable(${NAME} ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
Expand Down
22 changes: 14 additions & 8 deletions external/glm/glm/detail/func_common.inl
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,16 @@ namespace detail

# if GLM_HAS_CXX11_STL
return std::isnan(x);
# elif GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)
# elif GLM_COMPILER & GLM_COMPILER_VC
return _isnan(x) != 0;
# elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L
# elif GLM_COMPILER & GLM_COMPILER_INTEL
# if GLM_PLATFORM & GLM_PLATFORM_WINDOWS
return _isnan(x) != 0;
# else
return std::isnan(x);
return ::isnan(x) != 0;
# endif
# elif (GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))) && (GLM_PLATFORM & GLM_PLATFORM_ANDROID) && __cplusplus < 201103L
return _isnan(x) != 0;
# elif GLM_COMPILER & GLM_COMPILER_CUDA
return isnan(x) != 0;
# else
Expand Down Expand Up @@ -583,7 +585,11 @@ namespace detail
# if GLM_HAS_CXX11_STL
return std::isinf(x);
# elif GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# if(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# else
return ::isinf(x);
# endif
# elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
return _isinf(x) != 0;
Expand Down Expand Up @@ -662,15 +668,15 @@ namespace detail
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'frexp' only accept floating-point inputs");

return std::frexp(x, exp);
return std::frexp(x, &exp);
}

template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> frexp(tvec1<T, P> const & x, tvec1<int, P> & exp)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'frexp' only accept floating-point inputs");

return tvec1<T, P>(std::frexp(x.x, exp.x));
return tvec1<T, P>(std::frexp(x.x, &exp.x));
}

template <typename T, precision P>
Expand Down Expand Up @@ -706,7 +712,7 @@ namespace detail
frexp(x.w, exp.w));
}

template <typename genType, precision P>
template <typename genType>
GLM_FUNC_QUALIFIER genType ldexp(genType const & x, int const & exp)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'ldexp' only accept floating-point inputs");
Expand Down
12 changes: 4 additions & 8 deletions external/glm/glm/detail/func_integer.inl
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,8 @@ namespace detail
GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");

uint64 Value64 = static_cast<uint64>(x) * static_cast<uint64>(y);
uint32* PointerMSB = (reinterpret_cast<uint32*>(&Value64) + 1);
msb = *PointerMSB;
uint32* PointerLSB = (reinterpret_cast<uint32*>(&Value64) + 0);
lsb = *PointerLSB;
msb = static_cast<uint>(Value64 >> static_cast<uint64>(32));
lsb = static_cast<uint>(Value64);
}

template <precision P, template <typename, precision> class vecType>
Expand All @@ -270,10 +268,8 @@ namespace detail
GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");

int64 Value64 = static_cast<int64>(x) * static_cast<int64>(y);
int32* PointerMSB = (reinterpret_cast<int32*>(&Value64) + 1);
msb = *PointerMSB;
int32* PointerLSB = (reinterpret_cast<int32*>(&Value64));
lsb = *PointerLSB;
msb = static_cast<int>(Value64 >> static_cast<int64>(32));
lsb = static_cast<int>(Value64);
}

template <precision P, template <typename, precision> class vecType>
Expand Down
93 changes: 0 additions & 93 deletions external/glm/glm/detail/func_noise.hpp

This file was deleted.

Loading

0 comments on commit 07db647

Please sign in to comment.