Merged 0.9.8 branch

This commit is contained in:
Christophe Riccio
2017-01-07 12:15:08 +01:00
18 changed files with 183 additions and 136 deletions

View File

@@ -2,6 +2,8 @@
#define GLM_FORCE_SWIZZLE
#include <glm/glm.hpp>
#if !GLM_HAS_ONLY_XYZW
int test_ivec2_swizzle()
{
int Error = 0;
@@ -60,16 +62,19 @@ int test_vec4_swizzle()
return Error;
}
#endif//!GLM_HAS_ONLY_XYZW
int main()
{
int Error = 0;
Error += test_ivec2_swizzle();
Error += test_ivec3_swizzle();
Error += test_ivec4_swizzle();
# if !GLM_HAS_ONLY_XYZW
Error += test_ivec2_swizzle();
Error += test_ivec3_swizzle();
Error += test_ivec4_swizzle();
Error += test_vec4_swizzle();
Error += test_vec4_swizzle();
# endif//!GLM_HAS_ONLY_XYZW
return Error;
}

View File

@@ -3,6 +3,9 @@
#include <glm/gtc/vec1.hpp>
#include <vector>
static glm::vec1 v1;
static glm::vec1 v2(1);
int test_vec1_operators()
{
int Error(0);

View File

@@ -6,6 +6,10 @@
# include <type_traits>
#endif
static glm::vec2 v1;
static glm::vec2 v2(1);
static glm::vec2 v3(1, 1);
int test_vec2_operators()
{
int Error = 0;

View File

@@ -7,6 +7,10 @@
#include <cstdio>
#include <vector>
static glm::vec3 v1;
static glm::vec3 v2(1);
static glm::vec3 v3(1, 1, 1);
int test_vec3_ctor()
{
int Error = 0;
@@ -334,6 +338,7 @@ int test_vec3_swizzle3_3()
return Error;
}
#if !GLM_HAS_ONLY_XYZW
int test_vec3_swizzle_operators()
{
int Error = 0;
@@ -440,6 +445,7 @@ int test_vec3_swizzle_partial()
return Error;
}
#endif//!GLM_HAS_ONLY_XYZW
int test_operator_increment()
{
@@ -480,10 +486,13 @@ int main()
Error += test_vec3_size();
Error += test_vec3_swizzle3_2();
Error += test_vec3_swizzle3_3();
Error += test_vec3_swizzle_partial();
Error += test_vec3_swizzle_operators();
Error += test_vec3_swizzle_functions();
Error += test_operator_increment();
# if !GLM_HAS_ONLY_XYZW
Error += test_vec3_swizzle_partial();
Error += test_vec3_swizzle_operators();
Error += test_vec3_swizzle_functions();
# endif//!GLM_HAS_ONLY_XYZW
return Error;
}

View File

@@ -8,7 +8,11 @@
#include <ctime>
#include <vector>
template<int Value>
static glm::vec4 v1;
static glm::vec4 v2(1);
static glm::vec4 v3(1, 1, 1, 1);
template <int Value>
struct mask
{
enum{value = Value};