Added explicit swizzle functions
This commit is contained in:
@@ -24,6 +24,7 @@ glmCreateTestGTC(core_func_noise)
|
||||
glmCreateTestGTC(core_func_packing)
|
||||
glmCreateTestGTC(core_func_trigonometric)
|
||||
glmCreateTestGTC(core_func_vector_relational)
|
||||
glmCreateTestGTC(core_func_swizzle)
|
||||
glmCreateTestGTC(core_setup_message)
|
||||
glmCreateTestGTC(core_setup_precision)
|
||||
|
||||
|
||||
35
test/core/core_func_swizzle.cpp
Normal file
35
test/core/core_func_swizzle.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2011-10-16
|
||||
// Updated : 2011-10-16
|
||||
// Licence : This source is under MIT License
|
||||
// File : test/core/core_func_swizzle.cpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define GLM_FORCE_CXX98
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
int test_vec4_swizzle()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
glm::ivec4 A(1, 2, 3, 4);
|
||||
glm::ivec4 B = A.xyzw();
|
||||
|
||||
Error += A == B ? 0 : 1;
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
Error += test_vec4_swizzle();
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user