C++11 tests
This commit is contained in:
parent
156235e574
commit
1d05f79eb8
@ -12,7 +12,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
#add_definitions(-S)
|
||||
#add_definitions(-s)
|
||||
add_definitions(-msse2)
|
||||
add_definitions(-std=c++0x )
|
||||
add_definitions(-std=c++0x)
|
||||
add_definitions(-fms-extensions)
|
||||
add_definitions(-D_MSC_EXTENSIONS)
|
||||
#add_definitions(-m32)
|
||||
#add_definitions(-mfpmath=387)
|
||||
#add_definitions(-ffast-math)
|
||||
|
@ -62,9 +62,9 @@ namespace detail
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
|
||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||
value_type x, y;
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT || GLM_LANG == GLM_LANG_CXX0X)
|
||||
union
|
||||
{
|
||||
_GLM_SWIZZLE2_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,x,y)
|
||||
@ -81,10 +81,10 @@ namespace detail
|
||||
struct{value_type s, t;};
|
||||
struct{value_type x, y;};
|
||||
};
|
||||
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
||||
# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
|
||||
union {value_type x, r, s;};
|
||||
union {value_type y, g, t;};
|
||||
# endif//GLM_COMPONENT
|
||||
# endif//GLM_COMPONENT
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
|
@ -64,18 +64,18 @@ namespace detail
|
||||
|
||||
# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
|
||||
value_type x, y, z, w;
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
|
||||
# elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT || GLM_LANG == GLM_LANG_CXX0X)
|
||||
union
|
||||
{
|
||||
_GLM_SWIZZLE4_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,x,y,z,w)
|
||||
_GLM_SWIZZLE4_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,r,g,b,a)
|
||||
_GLM_SWIZZLE4_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,s,t,p,q)
|
||||
_GLM_SWIZZLE4_3_MEMBERS(value_type,glm::detail::tvec3<value_type>,x,y,z,w)
|
||||
_GLM_SWIZZLE4_3_MEMBERS(value_type,glm::detail::tvec3<value_type>,r,g,b,a)
|
||||
_GLM_SWIZZLE4_3_MEMBERS(value_type,glm::detail::tvec3<value_type>,s,t,p,q)
|
||||
_GLM_SWIZZLE4_4_MEMBERS(value_type,glm::detail::tvec4<value_type>,x,y,z,w)
|
||||
_GLM_SWIZZLE4_4_MEMBERS(value_type,glm::detail::tvec4<value_type>,r,g,b,a)
|
||||
_GLM_SWIZZLE4_4_MEMBERS(value_type,glm::detail::tvec4<value_type>,s,t,p,q)
|
||||
_GLM_SWIZZLE4_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,x,y,z,w)
|
||||
_GLM_SWIZZLE4_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,r,g,b,a)
|
||||
_GLM_SWIZZLE4_2_MEMBERS(value_type,glm::detail::tvec2<value_type>,s,t,p,q)
|
||||
_GLM_SWIZZLE4_3_MEMBERS(value_type,glm::detail::tvec3<value_type>,x,y,z,w)
|
||||
_GLM_SWIZZLE4_3_MEMBERS(value_type,glm::detail::tvec3<value_type>,r,g,b,a)
|
||||
_GLM_SWIZZLE4_3_MEMBERS(value_type,glm::detail::tvec3<value_type>,s,t,p,q)
|
||||
_GLM_SWIZZLE4_4_MEMBERS(value_type,glm::detail::tvec4<value_type>,x,y,z,w)
|
||||
_GLM_SWIZZLE4_4_MEMBERS(value_type,glm::detail::tvec4<value_type>,r,g,b,a)
|
||||
_GLM_SWIZZLE4_4_MEMBERS(value_type,glm::detail::tvec4<value_type>,s,t,p,q)
|
||||
|
||||
struct{value_type r, g, b, a;};
|
||||
struct{value_type s, t, p, q;};
|
||||
|
@ -47,7 +47,7 @@
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
#ifndef _MSC_EXTENSIONS
|
||||
#if 0 //ndef _MSC_EXTENSIONS
|
||||
template <>
|
||||
struct tvec2<thalf>
|
||||
{
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace glm{
|
||||
namespace detail{
|
||||
|
||||
#ifndef _MSC_EXTENSIONS
|
||||
#if 0//ndef _MSC_EXTENSIONS
|
||||
|
||||
//////////////////////////////////////
|
||||
// hvec2
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/half_float.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
static int test_vec3_operators()
|
||||
{
|
||||
@ -251,5 +252,7 @@ int main()
|
||||
Error += test_vec3_swizzle_operators();
|
||||
Error += test_vec3_swizzle_functions();
|
||||
|
||||
printf("Errors: %d\n", Error);
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user