Merge branch '0.9.1'

This commit is contained in:
Christophe Riccio 2011-05-07 10:04:54 +01:00
commit 67e504e40b
7 changed files with 62 additions and 115 deletions

View File

@ -3,8 +3,9 @@
<glm copyright="Copyright © 2005 - 2011">
<downloads>
<section name="GLM - zip files">
<download name="GLM 0.9.1.2" date="12/04/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
<download name="GLM 0.9.1.1" date="17/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
<download name="GLM 0.9.1.3" date="07/05/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download"/>
<download name="GLM 0.9.1.2" date="12/04/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.zip/download"/>
<download name="GLM 0.9.1.1" date="17/03/2010" size="3.4 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.zip/download"/>
<download name="GLM 0.9.1.0" date="03/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.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"/>
@ -61,8 +62,9 @@
<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 name="GLM - 7z files">
<download name="GLM 0.9.1.3" date="07/05/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download"/>
<download name="GLM 0.9.1.2" date="12/04/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.2/glm-0.9.1.2.7z/download"/>
<download name="GLM 0.9.1.1" date="17/03/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.7z/download"/>
<download name="GLM 0.9.1.1" date="17/03/2011" size="2.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.1/glm-0.9.1.1.7z/download"/>
<download name="GLM 0.9.1.0" date="03/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.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"/>
@ -152,6 +154,16 @@
</todo>
<page_news>
<news index="0064" date="07/05/2011" title="GLM 0.9.1.3 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
<paragraph>
Various bugs fixed with GLM 0.9.1.3.
</paragraph>
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.zip/download">GLM 0.9.1.3 (zip)</source>
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.1.3/glm-0.9.1.3.7z/download">GLM 0.9.1.3 (7z)</source>
<source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
</news>
<news index="0063" date="15/04/2011" title="GLM 0.9.1.2 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
<paragraph>
Bug fixes Only for GLM 0.9.1.2.

View File

@ -18,19 +18,15 @@ namespace detail
{
class thalf;
#if(GLM_COMPILER & GLM_COMPILER_VC)
#if(__STDC_VERSION__ >= 199901L) // C99 detected, 64 bit types available
typedef int64_t sint64;
typedef uint64_t uint64;
#elif(GLM_COMPILER & GLM_COMPILER_VC)
typedef signed __int64 sint64;
typedef unsigned __int64 uint64;
#elif(GLM_COMPILER & GLM_COMPILER_GCC)
__extension__ typedef signed long long sint64;
__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;

View File

@ -466,8 +466,8 @@ namespace glm
detail::tmat2x2<T> Inverse(
+ m[1][1] / Determinant,
- m[1][0] / Determinant,
- m[0][1] / Determinant,
- m[1][0] / Determinant,
+ m[0][0] / Determinant);
return Inverse;

View File

@ -422,7 +422,7 @@ namespace quaternion{
detail::tquat<T> const & q
)
{
return gtc::quaternion::conjugate(q) / gtc::quaternion::length(q);
return gtc::quaternion::conjugate(q) / gtc::quaternion::dot(q, q);
}
template <typename T>

View File

@ -275,7 +275,7 @@ namespace glm
detail::fvec4SIMD const & x
)
{
GLM_ALIGN(4) detail::tvec4<float> Result;
GLM_ALIGN(16) detail::tvec4<float> Result;
_mm_store_ps(&Result[0], x.Data);
return Result;
}

View File

@ -13,6 +13,11 @@ GLM is a header only library, there is nothing to build, just include it.
More informations in GLM manual:
http://glm.g-truc.net/glm-0.9.1.pdf
================================================================================
GLM 0.9.1.3: 2010-05-07
--------------------------------------------------------------------------------
- Fixed bugs
================================================================================
GLM 0.9.1.2: 2010-04-15
--------------------------------------------------------------------------------

View File

@ -4,145 +4,79 @@
// Created : 2011-01-15
// Updated : 2011-01-15
// Licence : This source is under MIT licence
// File : test/gtx/simd-mat4.cpp
// File : test/core/func_matrix.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#define GLM_INSTRUCTION_SET GLM_PLATFORM_SSE3 | GLM_PLATFORM_SSE2
#include <glm/glm.hpp>
int test_static_assert()
int test_matrixCompMult()
{
//glm::lessThan(glm::mat4(0), glm::mat4(4));
return 0;
}
int test_lessThan_vec2()
int test_outerProduct()
{
glm::bvec2 O = glm::bvec2(true, false);
glm::bvec2 A = glm::lessThan(glm::vec2(0, 6), glm::vec2(4, 2));
assert(glm::all(glm::equal(O, A)));
glm::bvec2 B = glm::lessThan(glm::ivec2(0, 6), glm::ivec2(4, 2));
assert(glm::all(glm::equal(O, B)));
glm::bvec2 C = glm::lessThan(glm::uvec2(0, 6), glm::uvec2(4, 2));
assert(glm::all(glm::equal(O, C)));
return 0;
}
int test_lessThan_vec3()
int test_transpose()
{
glm::bvec3 O = glm::bvec3(true, true, false);
glm::bvec3 A = glm::lessThan(glm::vec3(0, 1, 6), glm::vec3(4, 5, 2));
assert(glm::all(glm::equal(O, A)));
glm::bvec3 B = glm::lessThan(glm::ivec3(0, 1, 6), glm::ivec3(4, 5, 2));
assert(glm::all(glm::equal(O, B)));
glm::bvec3 C = glm::lessThan(glm::uvec3(0, 1, 6), glm::uvec3(4, 5, 2));
assert(glm::all(glm::equal(O, C)));
return 0;
}
int test_lessThan_vec4()
int test_determinant()
{
glm::bvec4 O = glm::bvec4(true, true, false, false);
glm::bvec4 A = glm::lessThan(glm::vec4(0, 1, 6, 7), glm::vec4(4, 5, 2, 3));
assert(glm::all(glm::equal(O, A)));
glm::bvec4 B = glm::lessThan(glm::ivec4(0, 1, 6, 7), glm::ivec4(4, 5, 2, 3));
assert(glm::all(glm::equal(O, B)));
glm::bvec4 C = glm::lessThan(glm::uvec4(0, 1, 6, 7), glm::uvec4(4, 5, 2, 3));
assert(glm::all(glm::equal(O, C)));
return 0;
}
int test_greaterThanEqual_vec2()
int test_inverse()
{
glm::bvec2 O = glm::bvec2(false, true);
int Failed(0);
glm::bvec2 A = glm::greaterThanEqual(glm::vec2(0, 6), glm::vec2(4, 2));
assert(glm::all(glm::equal(O, A)));
glm::mat4x4 A4x4(
glm::vec4(1, 0, 1, 0),
glm::vec4(0, 1, 0, 0),
glm::vec4(0, 0, 1, 0),
glm::vec4(0, 0, 0, 1));
glm::mat4x4 B4x4 = glm::inverse(A4x4);
glm::mat4x4 I4x4 = A4x4 * B4x4;
Failed += I4x4 == glm::mat4x4(1) ? 0 : 1;
glm::bvec2 B = glm::greaterThanEqual(glm::ivec2(0, 6), glm::ivec2(4, 2));
assert(glm::all(glm::equal(O, B)));
glm::mat3x3 A3x3(
glm::vec3(1, 0, 1),
glm::vec3(0, 1, 0),
glm::vec3(0, 0, 1));
glm::mat3x3 B3x3 = glm::inverse(A3x3);
glm::mat3x3 I3x3 = A3x3 * B3x3;
Failed += I3x3 == glm::mat3x3(1) ? 0 : 1;
glm::bvec2 C = glm::greaterThanEqual(glm::uvec2(0, 6), glm::uvec2(4, 2));
assert(glm::all(glm::equal(O, C)));
glm::mat2x2 A2x2(
glm::vec2(1, 1),
glm::vec2(0, 1));
glm::mat2x2 B2x2 = glm::inverse(A2x2);
glm::mat2x2 I2x2 = A2x2 * B2x2;
Failed += I2x2 == glm::mat2x2(1) ? 0 : 1;
return 0;
}
int test_greaterThanEqual_vec3()
{
glm::bvec3 O = glm::bvec3(false, false, true);
glm::bvec3 A = glm::greaterThanEqual(glm::vec3(0, 1, 6), glm::vec3(4, 5, 2));
assert(glm::all(glm::equal(O, A)));
glm::bvec3 B = glm::greaterThanEqual(glm::ivec3(0, 1, 6), glm::ivec3(4, 5, 2));
assert(glm::all(glm::equal(O, B)));
glm::bvec3 C = glm::greaterThanEqual(glm::uvec3(0, 1, 6), glm::uvec3(4, 5, 2));
assert(glm::all(glm::equal(O, C)));
return 0;
}
int test_greaterThanEqual_vec4()
{
glm::bvec4 O = glm::bvec4(false, false, true, true);
glm::bvec4 A = glm::greaterThanEqual(glm::vec4(0, 1, 6, 7), glm::vec4(4, 5, 2, 3));
assert(glm::all(glm::equal(O, A)));
glm::bvec4 B = glm::greaterThanEqual(glm::ivec4(0, 1, 6, 7), glm::ivec4(4, 5, 2, 3));
assert(glm::all(glm::equal(O, B)));
glm::bvec4 C = glm::greaterThanEqual(glm::uvec4(0, 1, 6, 7), glm::uvec4(4, 5, 2, 3));
assert(glm::all(glm::equal(O, C)));
return 0;
}
int test_all()
{
assert(glm::all(glm::bvec2(true, true)));
assert(!glm::all(glm::bvec2(true, false)));
assert(!glm::all(glm::bvec2(false, false)));
assert(glm::all(glm::bvec3(true, true, true)));
assert(!glm::all(glm::bvec3(true, false, true)));
assert(!glm::all(glm::bvec3(false, false, false)));
assert(glm::all(glm::bvec4(true, true, true, true)));
assert(!glm::all(glm::bvec4(true, false, true, false)));
assert(!glm::all(glm::bvec4(false, false, false, false)));
return 0;
return Failed;
}
int main()
{
int Failed = 0;
Failed += test_static_assert();
Failed += test_lessThan_vec2();
Failed += test_lessThan_vec3();
Failed += test_lessThan_vec4();
Failed += test_greaterThanEqual_vec2();
Failed += test_greaterThanEqual_vec3();
Failed += test_greaterThanEqual_vec4();
Failed += test_all();
Failed += test_matrixCompMult();
Failed += test_outerProduct();
Failed += test_transpose();
Failed += test_determinant();
Failed += test_inverse();
return Failed;
}