C++11 tests

This commit is contained in:
Christophe Riccio 2011-09-24 23:25:09 +01:00
parent 156235e574
commit 1d05f79eb8
6 changed files with 22 additions and 17 deletions

View File

@ -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)

View File

@ -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

View File

@ -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;};

View File

@ -47,7 +47,7 @@
namespace glm{
namespace detail
{
#ifndef _MSC_EXTENSIONS
#if 0 //ndef _MSC_EXTENSIONS
template <>
struct tvec2<thalf>
{

View File

@ -29,7 +29,7 @@
namespace glm{
namespace detail{
#ifndef _MSC_EXTENSIONS
#if 0//ndef _MSC_EXTENSIONS
//////////////////////////////////////
// hvec2

View File

@ -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;
}