Added GTC_type_aligned with aligned *vec* types
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define GLM_FORCE_ALIGNED
|
||||
#define GLM_SWIZZLE
|
||||
#include <glm/vector_relational.hpp>
|
||||
#include <glm/vec2.hpp>
|
||||
@@ -334,7 +335,7 @@ int test_vec4_equal()
|
||||
int test_vec4_size()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
|
||||
Error += sizeof(glm::vec4) == sizeof(glm::lowp_vec4) ? 0 : 1;
|
||||
Error += sizeof(glm::vec4) == sizeof(glm::mediump_vec4) ? 0 : 1;
|
||||
Error += sizeof(glm::vec4) == sizeof(glm::highp_vec4) ? 0 : 1;
|
||||
@@ -345,7 +346,14 @@ int test_vec4_size()
|
||||
Error += 32 == sizeof(glm::highp_dvec4) ? 0 : 1;
|
||||
Error += glm::vec4().length() == 4 ? 0 : 1;
|
||||
Error += glm::dvec4().length() == 4 ? 0 : 1;
|
||||
|
||||
|
||||
struct my_struct
|
||||
{
|
||||
glm::uint32 a;
|
||||
glm::vec4 b;
|
||||
};
|
||||
GLM_STATIC_ASSERT(sizeof(my_struct) == sizeof(glm::uint32) + sizeof(glm::vec4), "glm::vec4 alignment is not correct");
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ glmCreateTestGTC(gtc_quaternion)
|
||||
glmCreateTestGTC(gtc_random)
|
||||
glmCreateTestGTC(gtc_round)
|
||||
glmCreateTestGTC(gtc_reciprocal)
|
||||
glmCreateTestGTC(gtc_type_aligned)
|
||||
glmCreateTestGTC(gtc_type_precision)
|
||||
glmCreateTestGTC(gtc_type_ptr)
|
||||
glmCreateTestGTC(gtc_ulp)
|
||||
|
||||
11
test/gtc/gtc_type_aligned.cpp
Normal file
11
test/gtc/gtc_type_aligned.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
/// @file test/gtc/gtc_type_aligned.cpp
|
||||
|
||||
#define GLM_FORCE_ALIGNED
|
||||
#include <glm/gtc/type_aligned.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
return Error;
|
||||
}
|
||||
@@ -1,33 +1,4 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
/// of this software and associated documentation files (the "Software"), to deal
|
||||
/// in the Software without restriction, including without limitation the rights
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
/// THE SOFTWARE.
|
||||
///
|
||||
/// @file test/gtc/gtc_type_precision.cpp
|
||||
/// @date 2010-09-16 / 2014-11-25
|
||||
/// @author Christophe Riccio
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <glm/gtc/type_precision.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
|
||||
Reference in New Issue
Block a user