Merge branch '0.9.1' into gtx_ulp

master
Christophe Riccio ago%!(EXTRA string=14 years)
commit 29df45a166
  1. 13
      CMakeLists.txt
  2. 22
      doc/src/data.xml
  3. 2
      doc/theme/doxygen.css
  4. 19
      glm/core/_detail.hpp
  5. 18
      glm/core/_fixes.hpp
  6. 2
      glm/core/func_common.hpp
  7. 2
      glm/core/intrinsic_common.hpp
  8. 2
      glm/core/intrinsic_exponential.hpp
  9. 2
      glm/core/intrinsic_geometric.hpp
  10. 2
      glm/core/intrinsic_matrix.hpp
  11. 2
      glm/core/intrinsic_trigonometric.hpp
  12. 2
      glm/core/intrinsic_vector_relational.hpp
  13. 3
      glm/core/setup.hpp
  14. 2
      glm/core/type_float.hpp
  15. 37
      glm/core/type_int.hpp
  16. 44
      glm/glm.hpp
  17. 4
      glm/gtc/matrix_inverse.inl
  18. 6
      glm/gtc/matrix_transform.inl
  19. 2
      glm/gtc/quaternion.inl
  20. 362
      glm/gtc/swizzle.hpp
  21. 2
      glm/gtx/simd_mat4.hpp
  22. 2
      glm/gtx/simd_vec4.hpp
  23. 5
      readme.txt
  24. 7
      test/CMakeLists.txt

@ -2,11 +2,14 @@ cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
cmake_policy(VERSION 2.6) cmake_policy(VERSION 2.6)
project(glm) project(glm)
#Delayed for GLM 0.9.2
#enable_testing()
add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-pedantic)
#add_definitions(-S) #add_definitions(-S)
#add_definitions(-s) #add_definitions(-s)
#add_definitions(-msse2) add_definitions(-msse2)
#add_definitions(-m32) #add_definitions(-m32)
#add_definitions(-mfpmath=387) #add_definitions(-mfpmath=387)
#add_definitions(-ffast-math) #add_definitions(-ffast-math)
@ -19,7 +22,9 @@ add_subdirectory(test)
add_subdirectory(bench) add_subdirectory(bench)
add_subdirectory(doc) add_subdirectory(doc)
option(GLM_DEVELOPMENT_MODE "GLM development" OFF) option(GLM_TEST_MODE "GLM test" OFF)
if(NOT GLM_DEVELOPMENT_MODE) if(NOT GLM_TEST_MODE)
message(FATAL_ERROR "GLM is a header only library, no need to build it") message(FATAL_ERROR "GLM is a header only library, no need to build it. Set the option GLM_TEST_MODE with ON to build and run the test bench")
endif() endif()
install(DIRECTORY glm DESTINATION include)

@ -3,6 +3,7 @@
<glm copyright="Copyright © 2005 - 2011"> <glm copyright="Copyright © 2005 - 2011">
<downloads> <downloads>
<section name="GLM - zip files"> <section name="GLM - zip files">
<download name="GLM 0.9.1.0" date="02/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download"/>
<download name="GLM 0.9.1.B" date="13/02/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/> <download name="GLM 0.9.1.B" date="13/02/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.zip/download"/>
<download name="GLM 0.9.0.8" date="13/02/2010" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/> <download name="GLM 0.9.0.8" date="13/02/2010" size="3.3 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.zip/download"/>
<download name="GLM 0.9.1.A" date="31/01/2010" size="3.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download"/> <download name="GLM 0.9.1.A" date="31/01/2010" size="3.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.zip/download"/>
@ -58,6 +59,7 @@
<download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/> <download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/>
</section> </section>
<section name="GLM - 7z files"> <section name="GLM - 7z files">
<download name="GLM 0.9.1.0" date="02/03/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.7z/download"/>
<download name="GLM 0.9.1.B" date="13/02/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.7z/download"/> <download name="GLM 0.9.1.B" date="13/02/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.B/glm-0.9.1.B.7z/download"/>
<download name="GLM 0.9.0.8" date="13/02/2011" size="1.9 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.7z/download"/> <download name="GLM 0.9.0.8" date="13/02/2011" size="1.9 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.8/glm-0.9.0.8.7z/download"/>
<download name="GLM 0.9.1.A" date="31/01/2011" size="2.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.7z/download"/> <download name="GLM 0.9.1.A" date="31/01/2011" size="2.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.A/glm-0.9.1.A.7z/download"/>
@ -1544,7 +1546,25 @@
<page_news> <page_news>
<news index="0060" date="13/02/2011" title="GLM 0.9.0.8 and GLM 0.9.1 beta released" image="goodies/logo.png" image-mini="image/logo-mini.png"> <news index="0061" date="02/03/2011" title="GLM 0.9.1.0 final released" image="goodies/logo.png" image-mini="image/logo-mini.png">
<paragraph>
The stable version, GLM 0.9.0.8, adds the operator * for quaternion products and deprecated the cross function previously used for the same purpose.
Also, it clarifies that GLM is a header only library when a user try to build it. Once more, there is nothing to build.
</paragraph>
<paragraph>
The development version, GLM 0.9.1 beta, provides an improved <link href="http://glm.g-truc.net/html-0.9.1/index.html">API documentation</link> by
<link href="http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&amp;User=23530">Alfonse Reinheart</link>,
author of <link href="http://www.arcsynthesis.org/gltut/">a great OpenGL tutorial</link> which uses GLM.
This version also improves the SIMD extensions and it fixes many bugs.
</paragraph>
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.zip/download">GLM 0.9.1.0 (zip,)</source>
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.0/glm-0.9.1.0.7z/download">GLM 0.9.1.0 (7z)</source>
<source type="Link" href="http://glm.g-truc.net/glm-0.9.1.pdf">GLM 0.9.1 manual</source>
<source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
</news>
<news index="0060" date="13/02/2011" title="GLM 0.9.0.8 and GLM 0.9.1 beta released" image="goodies/logo.png" image-mini="image/logo-mini.png">
<paragraph> <paragraph>
The stable version, GLM 0.9.0.8, adds the operator * for quaternion products and deprecated the cross function previously used for the same purpose. The stable version, GLM 0.9.0.8, adds the operator * for quaternion products and deprecated the cross function previously used for the same purpose.
Also, it clarifies that GLM is a header only library when a user try to build it. Once more, there is nothing to build. Also, it clarifies that GLM is a header only library when a user try to build it. Once more, there is nothing to build.

@ -126,6 +126,8 @@ a {
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
padding:0px; padding:0px;
padding-top:8px;
padding-bottom:8px;
width:1000px; width:1000px;
} }

@ -10,7 +10,7 @@
#ifndef glm_core_detail #ifndef glm_core_detail
#define glm_core_detail #define glm_core_detail
#include "../setup.hpp" #include "setup.hpp"
#include <cassert> #include <cassert>
namespace glm{ namespace glm{
@ -24,6 +24,16 @@ namespace detail
#elif(GLM_COMPILER & GLM_COMPILER_GCC) #elif(GLM_COMPILER & GLM_COMPILER_GCC)
__extension__ typedef signed long long sint64; __extension__ typedef signed long long sint64;
__extension__ typedef unsigned long long uint64; __extension__ typedef unsigned long long uint64;
//# if GLM_MODEL == GLM_MODEL_64
// typedef signed long highp_int_t;
// typedef unsigned long highp_uint_t;
//# elif GLM_MODEL == GLM_MODEL_32
// __extension__ typedef signed long long highp_int_t;
// __extension__ typedef unsigned long long highp_uint_t;
//# endif//GLM_MODEL
#elif(GLM_COMPILER & GLM_COMPILER_BC)
typedef Int64 sint64;
typedef Uint64 uint64;
#else//unknown compiler #else//unknown compiler
typedef signed long sint64; typedef signed long sint64;
typedef unsigned long uint64; typedef unsigned long uint64;
@ -259,7 +269,7 @@ namespace detail
_YES = 1, \ _YES = 1, \
_NO = 0 \ _NO = 0 \
}; \ }; \
}; }
////////////////// //////////////////
// matrix // matrix
@ -323,11 +333,13 @@ namespace detail
#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) #if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
# define GLM_DEPRECATED __declspec(deprecated) # define GLM_DEPRECATED __declspec(deprecated)
# define GLM_ALIGN(x) __declspec(align(x)) # define GLM_ALIGN(x) __declspec(align(x))
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
# define GLM_RESTRICT __declspec(restrict) # define GLM_RESTRICT __declspec(restrict)
# define GLM_RESTRICT_VAR __restrict # define GLM_RESTRICT_VAR __restrict
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
# define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_DEPRECATED __attribute__((__deprecated__))
# define GLM_ALIGN(x) __attribute__((aligned(x))) # define GLM_ALIGN(x) __attribute__((aligned(x)))
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
# if(GLM_COMPILER >= GLM_COMPILER_GCC33) # if(GLM_COMPILER >= GLM_COMPILER_GCC33)
# define GLM_RESTRICT __restrict__ # define GLM_RESTRICT __restrict__
# define GLM_RESTRICT_VAR __restrict__ # define GLM_RESTRICT_VAR __restrict__
@ -339,7 +351,8 @@ namespace detail
# define GLM_RESTRICT_VAR __restrict__ # define GLM_RESTRICT_VAR __restrict__
#else #else
# define GLM_DEPRECATED # define GLM_DEPRECATED
# define GLM_ALIGN(x) # define GLM_ALIGN
# define GLM_ALIGNED_STRUCT(x)
# define GLM_RESTRICT # define GLM_RESTRICT
# define GLM_RESTRICT_VAR # define GLM_RESTRICT_VAR
#endif//GLM_COMPILER #endif//GLM_COMPILER

@ -0,0 +1,18 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2011-02-21
// Updated : 2011-02-21
// Licence : This source is under MIT License
// File : glm/core/_fixes.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
//! Workaround for compatibility with other libraries
#ifdef max
#undef max
#endif
//! Workaround for compatibility with other libraries
#ifdef min
#undef min
#endif

@ -10,6 +10,8 @@
#ifndef glm_core_func_common #ifndef glm_core_func_common
#define glm_core_func_common #define glm_core_func_common
#include "_fixes.hpp"
namespace glm namespace glm
{ {
namespace test{ namespace test{

@ -10,7 +10,7 @@
#ifndef glm_detail_intrinsic_common #ifndef glm_detail_intrinsic_common
#define glm_detail_intrinsic_common #define glm_detail_intrinsic_common
#include "../setup.hpp" #include "setup.hpp"
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
# error "SSE2 instructions not supported or enabled" # error "SSE2 instructions not supported or enabled"

@ -10,7 +10,7 @@
#ifndef glm_detail_intrinsic_exponential #ifndef glm_detail_intrinsic_exponential
#define glm_detail_intrinsic_exponential #define glm_detail_intrinsic_exponential
#include "../setup.hpp" #include "setup.hpp"
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
# error "SSE2 instructions not supported or enabled" # error "SSE2 instructions not supported or enabled"

@ -10,7 +10,7 @@
#ifndef glm_core_intrinsic_geometric #ifndef glm_core_intrinsic_geometric
#define glm_core_intrinsic_geometric #define glm_core_intrinsic_geometric
#include "../setup.hpp" #include "setup.hpp"
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
# error "SSE2 instructions not supported or enabled" # error "SSE2 instructions not supported or enabled"

@ -10,7 +10,7 @@
#ifndef glm_detail_intrinsic_matrix #ifndef glm_detail_intrinsic_matrix
#define glm_detail_intrinsic_matrix #define glm_detail_intrinsic_matrix
#include "../setup.hpp" #include "setup.hpp"
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
# error "SSE2 instructions not supported or enabled" # error "SSE2 instructions not supported or enabled"

@ -10,7 +10,7 @@
#ifndef glm_detail_intrinsic_trigonometric #ifndef glm_detail_intrinsic_trigonometric
#define glm_detail_intrinsic_trigonometric #define glm_detail_intrinsic_trigonometric
#include "../setup.hpp" #include "setup.hpp"
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
# error "SSE2 instructions not supported or enabled" # error "SSE2 instructions not supported or enabled"

@ -10,7 +10,7 @@
#ifndef glm_detail_intrinsic_vector_relational #ifndef glm_detail_intrinsic_vector_relational
#define glm_detail_intrinsic_vector_relational #define glm_detail_intrinsic_vector_relational
#include "../setup.hpp" #include "setup.hpp"
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
# error "SSE2 instructions not supported or enabled" # error "SSE2 instructions not supported or enabled"

@ -17,7 +17,7 @@
#define GLM_VERSION_MAJOR 0 #define GLM_VERSION_MAJOR 0
#define GLM_VERSION_MINOR 9 #define GLM_VERSION_MINOR 9
#define GLM_VERSION_PATCH 1 #define GLM_VERSION_PATCH 1
#define GLM_VERSION_REVISION B #define GLM_VERSION_REVISION 0
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Compiler // Compiler
@ -365,6 +365,7 @@
# define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1] # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
#else #else
# define GLM_STATIC_ASSERT(x, message) # define GLM_STATIC_ASSERT(x, message)
# define GLM_STATIC_ASSERT_NULL
#endif//GLM_LANG #endif//GLM_LANG
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////

@ -11,7 +11,7 @@
#define glm_core_type_float #define glm_core_type_float
#include "type_half.hpp" #include "type_half.hpp"
#include "../setup.hpp" #include "setup.hpp"
namespace glm namespace glm
{ {

@ -10,33 +10,20 @@
#ifndef glm_core_type_int #ifndef glm_core_type_int
#define glm_core_type_int #define glm_core_type_int
#include "../setup.hpp" #include "setup.hpp"
#include "_detail.hpp" #include "_detail.hpp"
namespace glm namespace glm
{ {
namespace detail namespace detail
{ {
#if defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC) typedef signed short lowp_int_t;
typedef signed __int64 highp_int_t; typedef signed int mediump_int_t;
typedef unsigned __int64 highp_uint_t; typedef sint64 highp_int_t;
#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC))
__extension__ typedef signed long long highp_int_t; typedef unsigned short lowp_uint_t;
__extension__ typedef unsigned long long highp_uint_t; typedef unsigned int mediump_uint_t;
//# if GLM_MODEL == GLM_MODEL_64 typedef uint64 highp_uint_t;
// typedef signed long highp_int_t;
// typedef unsigned long highp_uint_t;
//# elif GLM_MODEL == GLM_MODEL_32
// __extension__ typedef signed long long highp_int_t;
// __extension__ typedef unsigned long long highp_uint_t;
//# endif//GLM_MODEL
#elif(defined(GLM_COMPILER_BC))
typedef Int64 highp_int_t;
typedef Uint64 highp_uint_t;
#else
typedef signed long long highp_int_t;
typedef unsigned long long highp_uint_t;
#endif//GLM_COMPILER
GLM_DETAIL_IS_INT(signed char); GLM_DETAIL_IS_INT(signed char);
GLM_DETAIL_IS_INT(signed short); GLM_DETAIL_IS_INT(signed short);
@ -49,14 +36,6 @@ namespace glm
GLM_DETAIL_IS_UINT(unsigned int); GLM_DETAIL_IS_UINT(unsigned int);
GLM_DETAIL_IS_UINT(unsigned long); GLM_DETAIL_IS_UINT(unsigned long);
GLM_DETAIL_IS_UINT(highp_uint_t); GLM_DETAIL_IS_UINT(highp_uint_t);
typedef signed short lowp_int_t;
typedef signed int mediump_int_t;
typedef detail::highp_int_t highp_int_t;
typedef unsigned short lowp_uint_t;
typedef unsigned int mediump_uint_t;
typedef detail::highp_uint_t highp_uint_t;
} }
//namespace detail //namespace detail

@ -7,29 +7,19 @@
// File : glm/glm.hpp // File : glm/glm.hpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include "core/_fixes.hpp"
#ifndef glm_glm #ifndef glm_glm
#define glm_glm #define glm_glm
//! Workaround for compatibility with other libraries
#ifdef max
#undef max
#endif
//! Workaround for compatibility with other libraries
#ifdef min
#undef min
#endif
//! TODO: to delete //! TODO: to delete
#define GLMvalType typename genType::value_type #define GLMvalType typename genType::value_type
//#define GLMcolType typename genType::col_type
//#define GLMrowType typename genType::row_type
#include <cmath> #include <cmath>
#include <climits> #include <climits>
#include <cfloat> #include <cfloat>
#include <limits> #include <limits>
#include "./setup.hpp" #include "core/setup.hpp"
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
@ -95,18 +85,20 @@ namespace glm
//////////////////// ////////////////////
// check type sizes // check type sizes
GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); #ifndef GLM_STATIC_ASSERT_NULL
GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform");
GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform");
#endif//GLM_STATIC_ASSERT_NULL
#endif //glm_glm #endif //glm_glm

@ -8,7 +8,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
namespace glm{ namespace glm{
namespace gtx{ namespace gtc{
namespace matrix_inverse namespace matrix_inverse
{ {
template <typename T> template <typename T>
@ -135,5 +135,5 @@ namespace matrix_inverse
} }
}//namespace matrix_inverse }//namespace matrix_inverse
}//namespace gtx }//namespace gtc
}//namespace glm }//namespace glm

@ -332,14 +332,14 @@ namespace matrix_transform
detail::tvec4<U> const & viewport detail::tvec4<U> const & viewport
) )
{ {
assert(delta.x > 0.0f && delta.y > 0.0f) assert(delta.x > T(0) && delta.y > T(0));
detail::tmat4x4<T> Result(1.0f); detail::tmat4x4<T> Result(1.0f);
if(!(delta.x > 0.0f && delta.y > 0.0f)) if(!(delta.x > T(0) && delta.y > T(0)))
return Result; // Error return Result; // Error
// Translate and scale the picked region to the entire window // Translate and scale the picked region to the entire window
Result = translate(Result, (T(viewport[2]) - T(2) * (x - T(viewport[0]))) / delta.x, (T(viewport[3]) - T(2) * (y - T(viewport[1]))) / delta.y, T(0)); Result = translate(Result, (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, T(0));
return scale(Result, T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)); return scale(Result, T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1));
} }

@ -404,7 +404,7 @@ namespace quaternion{
if(flip) if(flip)
alpha = -alpha; alpha = -alpha;
return normalize(beta * x + alpha * y2); return normalize(beta * x + alpha * y);
} }
template <typename T> template <typename T>

@ -148,113 +148,113 @@ namespace glm
inline detail::tvec4<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \ inline detail::tvec4<TYPE> swizzle(detail::tvec##SIZE<TYPE> const & v) \
{return detail::tvec4<TYPE>(v[x], v[y], v[z], v[w]);} {return detail::tvec4<TYPE>(v[x], v[y], v[z], v[w]);}
*/ */
static_swizzle2_const(glm::f16vec2); static_swizzle2_const(glm::f16vec2)
static_swizzle2_const(glm::f16vec3); static_swizzle2_const(glm::f16vec3)
static_swizzle2_const(glm::f16vec4); static_swizzle2_const(glm::f16vec4)
static_swizzle2_const(glm::f32vec2); static_swizzle2_const(glm::f32vec2)
static_swizzle2_const(glm::f32vec3); static_swizzle2_const(glm::f32vec3)
static_swizzle2_const(glm::f32vec4); static_swizzle2_const(glm::f32vec4)
static_swizzle2_const(glm::f64vec2); static_swizzle2_const(glm::f64vec2)
static_swizzle2_const(glm::f64vec3); static_swizzle2_const(glm::f64vec3)
static_swizzle2_const(glm::f64vec4); static_swizzle2_const(glm::f64vec4)
static_swizzle2_const(glm::i8vec2); static_swizzle2_const(glm::i8vec2)
static_swizzle2_const(glm::i8vec3); static_swizzle2_const(glm::i8vec3)
static_swizzle2_const(glm::i8vec4); static_swizzle2_const(glm::i8vec4)
static_swizzle2_const(glm::i16vec2); static_swizzle2_const(glm::i16vec2)
static_swizzle2_const(glm::i16vec3); static_swizzle2_const(glm::i16vec3)
static_swizzle2_const(glm::i16vec4); static_swizzle2_const(glm::i16vec4)
static_swizzle2_const(glm::i32vec2); static_swizzle2_const(glm::i32vec2)
static_swizzle2_const(glm::i32vec3); static_swizzle2_const(glm::i32vec3)
static_swizzle2_const(glm::i32vec4); static_swizzle2_const(glm::i32vec4)
static_swizzle2_const(glm::i64vec2); static_swizzle2_const(glm::i64vec2)
static_swizzle2_const(glm::i64vec3); static_swizzle2_const(glm::i64vec3)
static_swizzle2_const(glm::i64vec4); static_swizzle2_const(glm::i64vec4)
static_swizzle2_const(glm::u8vec2); static_swizzle2_const(glm::u8vec2)
static_swizzle2_const(glm::u8vec3); static_swizzle2_const(glm::u8vec3)
static_swizzle2_const(glm::u8vec4); static_swizzle2_const(glm::u8vec4)
static_swizzle2_const(glm::u16vec2); static_swizzle2_const(glm::u16vec2)
static_swizzle2_const(glm::u16vec3); static_swizzle2_const(glm::u16vec3)
static_swizzle2_const(glm::u16vec4); static_swizzle2_const(glm::u16vec4)
static_swizzle2_const(glm::u32vec2); static_swizzle2_const(glm::u32vec2)
static_swizzle2_const(glm::u32vec3); static_swizzle2_const(glm::u32vec3)
static_swizzle2_const(glm::u32vec4); static_swizzle2_const(glm::u32vec4)
static_swizzle2_const(glm::u64vec2); static_swizzle2_const(glm::u64vec2)
static_swizzle2_const(glm::u64vec3); static_swizzle2_const(glm::u64vec3)
static_swizzle2_const(glm::u64vec4); static_swizzle2_const(glm::u64vec4)
static_swizzle3_const(glm::f16vec2); static_swizzle3_const(glm::f16vec2)
static_swizzle3_const(glm::f16vec3); static_swizzle3_const(glm::f16vec3)
static_swizzle3_const(glm::f16vec4); static_swizzle3_const(glm::f16vec4)
static_swizzle3_const(glm::f32vec2); static_swizzle3_const(glm::f32vec2)
static_swizzle3_const(glm::f32vec3); static_swizzle3_const(glm::f32vec3)
static_swizzle3_const(glm::f32vec4); static_swizzle3_const(glm::f32vec4)
static_swizzle3_const(glm::f64vec2); static_swizzle3_const(glm::f64vec2)
static_swizzle3_const(glm::f64vec3); static_swizzle3_const(glm::f64vec3)
static_swizzle3_const(glm::f64vec4); static_swizzle3_const(glm::f64vec4)
static_swizzle3_const(glm::i8vec2); static_swizzle3_const(glm::i8vec2)
static_swizzle3_const(glm::i8vec3); static_swizzle3_const(glm::i8vec3)
static_swizzle3_const(glm::i8vec4); static_swizzle3_const(glm::i8vec4)
static_swizzle3_const(glm::i16vec2); static_swizzle3_const(glm::i16vec2)
static_swizzle3_const(glm::i16vec3); static_swizzle3_const(glm::i16vec3)
static_swizzle3_const(glm::i16vec4); static_swizzle3_const(glm::i16vec4)
static_swizzle3_const(glm::i32vec2); static_swizzle3_const(glm::i32vec2)
static_swizzle3_const(glm::i32vec3); static_swizzle3_const(glm::i32vec3)
static_swizzle3_const(glm::i32vec4); static_swizzle3_const(glm::i32vec4)
static_swizzle3_const(glm::i64vec2); static_swizzle3_const(glm::i64vec2)
static_swizzle3_const(glm::i64vec3); static_swizzle3_const(glm::i64vec3)
static_swizzle3_const(glm::i64vec4); static_swizzle3_const(glm::i64vec4)
static_swizzle3_const(glm::u8vec2); static_swizzle3_const(glm::u8vec2)
static_swizzle3_const(glm::u8vec3); static_swizzle3_const(glm::u8vec3)
static_swizzle3_const(glm::u8vec4); static_swizzle3_const(glm::u8vec4)
static_swizzle3_const(glm::u16vec2); static_swizzle3_const(glm::u16vec2)
static_swizzle3_const(glm::u16vec3); static_swizzle3_const(glm::u16vec3)
static_swizzle3_const(glm::u16vec4); static_swizzle3_const(glm::u16vec4)
static_swizzle3_const(glm::u32vec2); static_swizzle3_const(glm::u32vec2)
static_swizzle3_const(glm::u32vec3); static_swizzle3_const(glm::u32vec3)
static_swizzle3_const(glm::u32vec4); static_swizzle3_const(glm::u32vec4)
static_swizzle3_const(glm::u64vec2); static_swizzle3_const(glm::u64vec2)
static_swizzle3_const(glm::u64vec3); static_swizzle3_const(glm::u64vec3)
static_swizzle3_const(glm::u64vec4); static_swizzle3_const(glm::u64vec4)
static_swizzle4_const(glm::f16vec2); static_swizzle4_const(glm::f16vec2)
static_swizzle4_const(glm::f16vec3); static_swizzle4_const(glm::f16vec3)
static_swizzle4_const(glm::f16vec4); static_swizzle4_const(glm::f16vec4)
static_swizzle4_const(glm::f32vec2); static_swizzle4_const(glm::f32vec2)
static_swizzle4_const(glm::f32vec3); static_swizzle4_const(glm::f32vec3)
static_swizzle4_const(glm::f32vec4); static_swizzle4_const(glm::f32vec4)
static_swizzle4_const(glm::f64vec2); static_swizzle4_const(glm::f64vec2)
static_swizzle4_const(glm::f64vec3); static_swizzle4_const(glm::f64vec3)
static_swizzle4_const(glm::f64vec4); static_swizzle4_const(glm::f64vec4)
static_swizzle4_const(glm::i8vec2); static_swizzle4_const(glm::i8vec2)
static_swizzle4_const(glm::i8vec3); static_swizzle4_const(glm::i8vec3)
static_swizzle4_const(glm::i8vec4); static_swizzle4_const(glm::i8vec4)
static_swizzle4_const(glm::i16vec2); static_swizzle4_const(glm::i16vec2)
static_swizzle4_const(glm::i16vec3); static_swizzle4_const(glm::i16vec3)
static_swizzle4_const(glm::i16vec4); static_swizzle4_const(glm::i16vec4)
static_swizzle4_const(glm::i32vec2); static_swizzle4_const(glm::i32vec2)
static_swizzle4_const(glm::i32vec3); static_swizzle4_const(glm::i32vec3)
static_swizzle4_const(glm::i32vec4); static_swizzle4_const(glm::i32vec4)
static_swizzle4_const(glm::i64vec2); static_swizzle4_const(glm::i64vec2)
static_swizzle4_const(glm::i64vec3); static_swizzle4_const(glm::i64vec3)
static_swizzle4_const(glm::i64vec4); static_swizzle4_const(glm::i64vec4)
static_swizzle4_const(glm::u8vec2); static_swizzle4_const(glm::u8vec2)
static_swizzle4_const(glm::u8vec3); static_swizzle4_const(glm::u8vec3)
static_swizzle4_const(glm::u8vec4); static_swizzle4_const(glm::u8vec4)
static_swizzle4_const(glm::u16vec2); static_swizzle4_const(glm::u16vec2)
static_swizzle4_const(glm::u16vec3); static_swizzle4_const(glm::u16vec3)
static_swizzle4_const(glm::u16vec4); static_swizzle4_const(glm::u16vec4)
static_swizzle4_const(glm::u32vec2); static_swizzle4_const(glm::u32vec2)
static_swizzle4_const(glm::u32vec3); static_swizzle4_const(glm::u32vec3)
static_swizzle4_const(glm::u32vec4); static_swizzle4_const(glm::u32vec4)
static_swizzle4_const(glm::u64vec2); static_swizzle4_const(glm::u64vec2)
static_swizzle4_const(glm::u64vec3); static_swizzle4_const(glm::u64vec3)
static_swizzle4_const(glm::u64vec4); static_swizzle4_const(glm::u64vec4)
# define static_swizzle2_ref(TYPE) \ # define static_swizzle2_ref(TYPE) \
template <glm::comp x, glm::comp y> \ template <glm::comp x, glm::comp y> \
@ -271,80 +271,80 @@ namespace glm
inline glm::detail::tref4<typename TYPE::value_type> swizzle(TYPE & v) \ inline glm::detail::tref4<typename TYPE::value_type> swizzle(TYPE & v) \
{return glm::detail::tref4<typename TYPE::value_type>(v[x], v[y], v[z], v[w]);} {return glm::detail::tref4<typename TYPE::value_type>(v[x], v[y], v[z], v[w]);}
static_swizzle2_ref(glm::f16vec2); static_swizzle2_ref(glm::f16vec2)
static_swizzle2_ref(glm::f16vec3); static_swizzle2_ref(glm::f16vec3)
static_swizzle2_ref(glm::f16vec4); static_swizzle2_ref(glm::f16vec4)
static_swizzle2_ref(glm::f32vec2); static_swizzle2_ref(glm::f32vec2)
static_swizzle2_ref(glm::f32vec3); static_swizzle2_ref(glm::f32vec3)
static_swizzle2_ref(glm::f32vec4); static_swizzle2_ref(glm::f32vec4)
static_swizzle2_ref(glm::f64vec2); static_swizzle2_ref(glm::f64vec2)
static_swizzle2_ref(glm::f64vec3); static_swizzle2_ref(glm::f64vec3)
static_swizzle2_ref(glm::f64vec4); static_swizzle2_ref(glm::f64vec4)
static_swizzle2_ref(glm::i8vec2); static_swizzle2_ref(glm::i8vec2)
static_swizzle2_ref(glm::i8vec3); static_swizzle2_ref(glm::i8vec3)
static_swizzle2_ref(glm::i8vec4); static_swizzle2_ref(glm::i8vec4)
static_swizzle2_ref(glm::i16vec2); static_swizzle2_ref(glm::i16vec2)
static_swizzle2_ref(glm::i16vec3); static_swizzle2_ref(glm::i16vec3)
static_swizzle2_ref(glm::i16vec4); static_swizzle2_ref(glm::i16vec4)
static_swizzle2_ref(glm::i32vec2); static_swizzle2_ref(glm::i32vec2)
static_swizzle2_ref(glm::i32vec3); static_swizzle2_ref(glm::i32vec3)
static_swizzle2_ref(glm::i32vec4); static_swizzle2_ref(glm::i32vec4)
static_swizzle2_ref(glm::i64vec2); static_swizzle2_ref(glm::i64vec2)
static_swizzle2_ref(glm::i64vec3); static_swizzle2_ref(glm::i64vec3)
static_swizzle2_ref(glm::i64vec4); static_swizzle2_ref(glm::i64vec4)
static_swizzle2_ref(glm::u8vec2); static_swizzle2_ref(glm::u8vec2)
static_swizzle2_ref(glm::u8vec3); static_swizzle2_ref(glm::u8vec3)
static_swizzle2_ref(glm::u8vec4); static_swizzle2_ref(glm::u8vec4)
static_swizzle2_ref(glm::u16vec2); static_swizzle2_ref(glm::u16vec2)
static_swizzle2_ref(glm::u16vec3); static_swizzle2_ref(glm::u16vec3)
static_swizzle2_ref(glm::u16vec4); static_swizzle2_ref(glm::u16vec4)
static_swizzle2_ref(glm::u32vec2); static_swizzle2_ref(glm::u32vec2)
static_swizzle2_ref(glm::u32vec3); static_swizzle2_ref(glm::u32vec3)
static_swizzle2_ref(glm::u32vec4); static_swizzle2_ref(glm::u32vec4)
static_swizzle2_ref(glm::u64vec2); static_swizzle2_ref(glm::u64vec2)
static_swizzle2_ref(glm::u64vec3); static_swizzle2_ref(glm::u64vec3)
static_swizzle2_ref(glm::u64vec4); static_swizzle2_ref(glm::u64vec4)
static_swizzle3_ref(glm::f16vec3); static_swizzle3_ref(glm::f16vec3)
static_swizzle3_ref(glm::f16vec4); static_swizzle3_ref(glm::f16vec4)
static_swizzle3_ref(glm::f32vec3); static_swizzle3_ref(glm::f32vec3)
static_swizzle3_ref(glm::f32vec4); static_swizzle3_ref(glm::f32vec4)
static_swizzle3_ref(glm::f64vec3); static_swizzle3_ref(glm::f64vec3)
static_swizzle3_ref(glm::f64vec4); static_swizzle3_ref(glm::f64vec4)
static_swizzle3_ref(glm::i8vec3); static_swizzle3_ref(glm::i8vec3)
static_swizzle3_ref(glm::i8vec4); static_swizzle3_ref(glm::i8vec4)
static_swizzle3_ref(glm::i16vec3); static_swizzle3_ref(glm::i16vec3)
static_swizzle3_ref(glm::i16vec4); static_swizzle3_ref(glm::i16vec4)
static_swizzle3_ref(glm::i32vec3); static_swizzle3_ref(glm::i32vec3)
static_swizzle3_ref(glm::i32vec4); static_swizzle3_ref(glm::i32vec4)
static_swizzle3_ref(glm::i64vec3); static_swizzle3_ref(glm::i64vec3)
static_swizzle3_ref(glm::i64vec4); static_swizzle3_ref(glm::i64vec4)
static_swizzle3_ref(glm::u8vec3); static_swizzle3_ref(glm::u8vec3)
static_swizzle3_ref(glm::u8vec4); static_swizzle3_ref(glm::u8vec4)
static_swizzle3_ref(glm::u16vec3); static_swizzle3_ref(glm::u16vec3)
static_swizzle3_ref(glm::u16vec4); static_swizzle3_ref(glm::u16vec4)
static_swizzle3_ref(glm::u32vec3); static_swizzle3_ref(glm::u32vec3)
static_swizzle3_ref(glm::u32vec4); static_swizzle3_ref(glm::u32vec4)
static_swizzle3_ref(glm::u64vec3); static_swizzle3_ref(glm::u64vec3)
static_swizzle3_ref(glm::u64vec4); static_swizzle3_ref(glm::u64vec4)
static_swizzle4_ref(glm::f16vec4); static_swizzle4_ref(glm::f16vec4)
static_swizzle4_ref(glm::f32vec4); static_swizzle4_ref(glm::f32vec4)
static_swizzle4_ref(glm::f64vec4); static_swizzle4_ref(glm::f64vec4)
static_swizzle4_ref(glm::i8vec4); static_swizzle4_ref(glm::i8vec4)
static_swizzle4_ref(glm::i16vec4); static_swizzle4_ref(glm::i16vec4)
static_swizzle4_ref(glm::i32vec4); static_swizzle4_ref(glm::i32vec4)
static_swizzle4_ref(glm::i64vec4); static_swizzle4_ref(glm::i64vec4)
static_swizzle4_ref(glm::u8vec4); static_swizzle4_ref(glm::u8vec4)
static_swizzle4_ref(glm::u16vec4); static_swizzle4_ref(glm::u16vec4)
static_swizzle4_ref(glm::u32vec4); static_swizzle4_ref(glm::u32vec4)
static_swizzle4_ref(glm::u64vec4); static_swizzle4_ref(glm::u64vec4)
}//namespace swizzle }//namespace swizzle
}//namespace gtc }//namespace gtc

@ -34,7 +34,7 @@ namespace glm
{ {
/// 4x4 Matrix implemented using SIMD SEE intrinsics. /// 4x4 Matrix implemented using SIMD SEE intrinsics.
/// \ingroup gtx_simd_mat4 /// \ingroup gtx_simd_mat4
GLM_ALIGN(16) struct fmat4x4SIMD GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
{ {
enum ctor{null}; enum ctor{null};

@ -34,7 +34,7 @@ namespace glm
{ {
/// 4-dimensional vector implemented using SIMD SEE intrinsics. /// 4-dimensional vector implemented using SIMD SEE intrinsics.
/// \ingroup gtx_simd_vec4 /// \ingroup gtx_simd_vec4
GLM_ALIGN(4) struct fvec4SIMD GLM_ALIGNED_STRUCT(4) fvec4SIMD
{ {
enum ctor{null}; enum ctor{null};
typedef __m128 value_type; typedef __m128 value_type;

@ -13,6 +13,11 @@ GLM is a header only library, there is nothing to build, just include it.
More informations in GLM manual: More informations in GLM manual:
http://glm.g-truc.net/glm-manual.pdf http://glm.g-truc.net/glm-manual.pdf
================================================================================
GLM 0.9.1.0: 2010-03-02
--------------------------------------------------------------------------------
- Fixed bugs
================================================================================ ================================================================================
GLM 0.9.1.B: 2010-02-13 GLM 0.9.1.B: 2010-02-13
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

@ -1,8 +1,11 @@
function(glmCreateTestGTC NAME) function(glmCreateTestGTC NAME)
set(SAMPLE_NAME test-${NAME}) set(SAMPLE_NAME test-${NAME})
add_executable(${SAMPLE_NAME} ${NAME}.cpp ../test.hpp ../test.cpp) add_executable(${SAMPLE_NAME} ${NAME}.cpp ../test.hpp ../test.cpp)
endfunction(glmCreateTestGTC)
add_test(
NAME ${SAMPLE_NAME}
COMMAND $<TARGET_FILE:${SAMPLE_NAME}> )
endfunction()
add_subdirectory(bug) add_subdirectory(bug)
add_subdirectory(core) add_subdirectory(core)

Loading…
Cancel
Save