Przeglądaj źródła

Merge branch '0.9.2' into noise

Christophe Riccio 14 lat temu
rodzic
commit
d4dca93441

+ 2 - 2
glm/core/func_integer.inl

@@ -390,12 +390,12 @@ namespace glm
 		template <typename genIUType>
 		GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value)
 		{
-			GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, "'bitRevert' only accept integer values");
+			GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitfieldReverse' only accept integer values");
 
 			genIUType Out = 0;
 			std::size_t BitSize = sizeof(genIUType) * 8;
 			for(std::size_t i = 0; i < BitSize; ++i)
-				if(In & (genIUType(1) << i))
+				if(Value & (genIUType(1) << i))
 					Out |= genIUType(1) << (BitSize - 1 - i);
 			return Out;
 		}	

+ 1 - 0
glm/core/type_vec1.hpp

@@ -41,6 +41,7 @@ namespace glm
 
 			typedef T value_type;
 			typedef std::size_t size_type;
+			GLM_FUNC_DECL size_type length() const;
 			static GLM_FUNC_DECL size_type value_size();
 
 			typedef tvec1<T> type;

+ 6 - 0
glm/core/type_vec1.inl

@@ -11,6 +11,12 @@ namespace glm
 {
 	namespace detail
 	{
+		template <typename T>
+		GLM_FUNC_QUALIFIER typename tvec1<T>::size_type tvec1<T>::length() const
+		{
+			return 1;
+		}
+
 		template <typename T>
 		GLM_FUNC_QUALIFIER typename tvec1<T>::size_type tvec1<T>::value_size()
 		{

+ 1 - 0
glm/core/type_vec2.hpp

@@ -41,6 +41,7 @@ namespace glm
 
 			typedef T value_type;
 			typedef std::size_t size_type;
+			GLM_FUNC_DECL size_type length() const;
 			static GLM_FUNC_DECL size_type value_size();
 
 			typedef tvec2<T> type;

+ 6 - 0
glm/core/type_vec2.inl

@@ -11,6 +11,12 @@ namespace glm
 {
 	namespace detail
 	{
+		template <typename T>
+		GLM_FUNC_QUALIFIER typename tvec2<T>::size_type tvec2<T>::length() const
+		{
+			return 2;
+		}
+
 		template <typename T>
 		GLM_FUNC_QUALIFIER typename tvec2<T>::size_type tvec2<T>::value_size()
 		{

+ 1 - 0
glm/core/type_vec3.hpp

@@ -40,6 +40,7 @@ namespace glm
 
 			typedef T value_type;
 			typedef std::size_t size_type;
+			GLM_FUNC_DECL size_type length() const;
 			static GLM_FUNC_DECL size_type value_size();
 
 			typedef tvec3<T> type;

+ 6 - 0
glm/core/type_vec3.inl

@@ -11,6 +11,12 @@ namespace glm
 {
 	namespace detail
 	{
+		template <typename T>
+		GLM_FUNC_QUALIFIER typename tvec3<T>::size_type tvec3<T>::length() const
+		{
+			return 3;
+		}
+
 		template <typename T>
 		GLM_FUNC_QUALIFIER typename tvec3<T>::size_type tvec3<T>::value_size()
 		{

+ 1 - 0
glm/core/type_vec4.hpp

@@ -40,6 +40,7 @@ namespace glm
 
 			typedef T value_type;
 			typedef std::size_t size_type;
+			GLM_FUNC_DECL size_type length() const;
 			static GLM_FUNC_DECL size_type value_size();
 
 			typedef tvec4<T> type;

+ 6 - 0
glm/core/type_vec4.inl

@@ -11,6 +11,12 @@ namespace glm
 {
 	namespace detail
 	{
+		template <typename T>
+		GLM_FUNC_QUALIFIER typename tvec4<T>::size_type tvec4<T>::length() const
+		{
+			return 4;
+		}
+
 		template <typename T>
 		GLM_FUNC_QUALIFIER typename tvec4<T>::size_type tvec4<T>::value_size()
 		{

+ 2 - 6
glm/gtx/ulp.inl

@@ -169,11 +169,7 @@ namespace detail
 }//namespace glm
 
 #if(GLM_COMPILER & GLM_COMPILER_VC)
-#	if(GLM_MODEL == GLM_MODEL_32)
-#		define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward))
-#	else
-#		define GLM_NEXT_AFTER_FLT(x, toward) _nextafterf((x), (toward))
-#	endif
+#	define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward))
 #   define GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward))
 #else
 #   define GLM_NEXT_AFTER_FLT(x, toward) nextafterf((x), (toward))
@@ -261,7 +257,7 @@ namespace ulp
     template <typename T>
     GLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y)
     {
-        std::size_t ulp = 0;
+        uint ulp = 0;
 
         if(x < y)
         {

+ 10 - 1
readme.txt

@@ -11,7 +11,16 @@ GLM is a header only library, there is nothing to build, just include it.
 #include <glm/glm.hpp>
 
 More informations in GLM manual:
-http://glm.g-truc.net/glm-0.9.1.pdf
+http://glm.g-truc.net/glm-0.9.2.pdf
+
+================================================================================
+GLM 0.9.2.0: 2010-05-08
+--------------------------------------------------------------------------------
+- Added CUDA support
+- Added CTest test suite
+- Added GLM_GTX_ulp
+- Added GLM_GTX_matrix_interpolation
+- Updated quaternion slerp interpolation
 
 ================================================================================
 GLM 0.9.1.3: 2010-05-07

+ 369 - 6
test/gtc/gtc_matrix_access.cpp

@@ -2,18 +2,381 @@
 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Created : 2010-09-16
-// Updated : 2010-09-16
+// Updated : 2011-05-07
 // Licence : This source is under MIT licence
-// File    : test/gtc/matrix_transform.cpp
+// File    : test/gtc/matrix_access.cpp
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#define GLM_MESSAGES
 #include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/matrix_access.hpp>
+
+int test_mat2x2_row_set()
+{
+    int Error = 0;
+    
+    glm::mat2x2 m(1);
+    
+	m = glm::row(m, 0, glm::vec2( 0,  1));
+	m = glm::row(m, 1, glm::vec2( 4,  5));
+
+    Error += glm::row(m, 0) == glm::vec2( 0,  1) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec2( 4,  5) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat2x2_col_set()
+{
+    int Error = 0;
+    
+    glm::mat2x2 m(1);
+    
+	m = glm::column(m, 0, glm::vec2( 0,  1));
+	m = glm::column(m, 1, glm::vec2( 4,  5));
+
+    Error += glm::column(m, 0) == glm::vec2( 0,  1) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec2( 4,  5) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat2x3_row_set()
+{
+    int Error = 0;
+    
+    glm::mat2x3 m(1);
+    
+	m = glm::row(m, 0, glm::vec2( 0,  1));
+	m = glm::row(m, 1, glm::vec2( 4,  5));
+	m = glm::row(m, 2, glm::vec2( 8,  9));
+
+    Error += glm::row(m, 0) == glm::vec2( 0,  1) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec2( 4,  5) ? 0 : 1;
+    Error += glm::row(m, 2) == glm::vec2( 8,  9) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat2x3_col_set()
+{
+    int Error = 0;
+    
+    glm::mat2x3 m(1);
+    
+	m = glm::column(m, 0, glm::vec3( 0,  1,  2));
+	m = glm::column(m, 1, glm::vec3( 4,  5,  6));
+
+    Error += glm::column(m, 0) == glm::vec3( 0,  1,  2) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec3( 4,  5,  6) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat2x4_row_set()
+{
+    int Error = 0;
+    
+    glm::mat2x4 m(1);
+    
+	m = glm::row(m, 0, glm::vec2( 0,  1));
+	m = glm::row(m, 1, glm::vec2( 4,  5));
+	m = glm::row(m, 2, glm::vec2( 8,  9));
+	m = glm::row(m, 3, glm::vec2(12, 13));
+
+    Error += glm::row(m, 0) == glm::vec2( 0,  1) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec2( 4,  5) ? 0 : 1;
+    Error += glm::row(m, 2) == glm::vec2( 8,  9) ? 0 : 1;
+	Error += glm::row(m, 3) == glm::vec2(12, 13) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat2x4_col_set()
+{
+    int Error = 0;
+    
+    glm::mat2x4 m(1);
+    
+	m = glm::column(m, 0, glm::vec4( 0,  1,  2, 3));
+	m = glm::column(m, 1, glm::vec4( 4,  5,  6, 7));
+
+    Error += glm::column(m, 0) == glm::vec4( 0,  1,  2, 3) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec4( 4,  5,  6, 7) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat3x2_row_set()
+{
+    int Error = 0;
+    
+    glm::mat3x2 m(1);
+    
+	m = glm::row(m, 0, glm::vec3( 0,  1,  2));
+	m = glm::row(m, 1, glm::vec3( 4,  5,  6));
+
+    Error += glm::row(m, 0) == glm::vec3( 0,  1,  2) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec3( 4,  5,  6) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat3x2_col_set()
+{
+    int Error = 0;
+    
+    glm::mat3x2 m(1);
+    
+	m = glm::column(m, 0, glm::vec2( 0,  1));
+	m = glm::column(m, 1, glm::vec2( 4,  5));
+	m = glm::column(m, 2, glm::vec2( 8,  9));
+
+    Error += glm::column(m, 0) == glm::vec2( 0,  1) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec2( 4,  5) ? 0 : 1;
+    Error += glm::column(m, 2) == glm::vec2( 8,  9) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat3x3_row_set()
+{
+    int Error = 0;
+    
+    glm::mat3x3 m(1);
+    
+	m = glm::row(m, 0, glm::vec3( 0,  1,  2));
+	m = glm::row(m, 1, glm::vec3( 4,  5,  6));
+	m = glm::row(m, 2, glm::vec3( 8,  9, 10));
+
+    Error += glm::row(m, 0) == glm::vec3( 0,  1,  2) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec3( 4,  5,  6) ? 0 : 1;
+    Error += glm::row(m, 2) == glm::vec3( 8,  9, 10) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat3x3_col_set()
+{
+    int Error = 0;
+    
+    glm::mat3x3 m(1);
+    
+	m = glm::column(m, 0, glm::vec3( 0,  1,  2));
+	m = glm::column(m, 1, glm::vec3( 4,  5,  6));
+	m = glm::column(m, 2, glm::vec3( 8,  9, 10));
+
+    Error += glm::column(m, 0) == glm::vec3( 0,  1,  2) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec3( 4,  5,  6) ? 0 : 1;
+    Error += glm::column(m, 2) == glm::vec3( 8,  9, 10) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat3x4_row_set()
+{
+    int Error = 0;
+    
+    glm::mat3x4 m(1);
+    
+	m = glm::row(m, 0, glm::vec3( 0,  1,  2));
+	m = glm::row(m, 1, glm::vec3( 4,  5,  6));
+	m = glm::row(m, 2, glm::vec3( 8,  9, 10));
+	m = glm::row(m, 3, glm::vec3(12, 13, 14));
+
+    Error += glm::row(m, 0) == glm::vec3( 0,  1,  2) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec3( 4,  5,  6) ? 0 : 1;
+    Error += glm::row(m, 2) == glm::vec3( 8,  9, 10) ? 0 : 1;
+	Error += glm::row(m, 3) == glm::vec3(12, 13, 14) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat3x4_col_set()
+{
+    int Error = 0;
+    
+    glm::mat3x4 m(1);
+    
+	m = glm::column(m, 0, glm::vec4( 0,  1,  2, 3));
+	m = glm::column(m, 1, glm::vec4( 4,  5,  6, 7));
+	m = glm::column(m, 2, glm::vec4( 8,  9, 10, 11));
+
+    Error += glm::column(m, 0) == glm::vec4( 0,  1,  2, 3) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec4( 4,  5,  6, 7) ? 0 : 1;
+    Error += glm::column(m, 2) == glm::vec4( 8,  9, 10, 11) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x2_row_set()
+{
+    int Error = 0;
+    
+    glm::mat4x2 m(1);
+    
+	m = glm::row(m, 0, glm::vec4( 0,  1,  2,  3));
+	m = glm::row(m, 1, glm::vec4( 4,  5,  6,  7));
+
+    Error += glm::row(m, 0) == glm::vec4( 0,  1,  2,  3) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec4( 4,  5,  6,  7) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x2_col_set()
+{
+    int Error = 0;
+    
+    glm::mat4x2 m(1);
+    
+	m = glm::column(m, 0, glm::vec2( 0,  1));
+	m = glm::column(m, 1, glm::vec2( 4,  5));
+	m = glm::column(m, 2, glm::vec2( 8,  9));
+	m = glm::column(m, 3, glm::vec2(12, 13));
+
+    Error += glm::column(m, 0) == glm::vec2( 0,  1) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec2( 4,  5) ? 0 : 1;
+    Error += glm::column(m, 2) == glm::vec2( 8,  9) ? 0 : 1;
+    Error += glm::column(m, 3) == glm::vec2(12, 13) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x3_row_set()
+{
+    int Error = 0;
+    
+    glm::mat4x3 m(1);
+    
+	m = glm::row(m, 0, glm::vec4( 0,  1,  2,  3));
+	m = glm::row(m, 1, glm::vec4( 4,  5,  6,  7));
+	m = glm::row(m, 2, glm::vec4( 8,  9, 10, 11));
+
+    Error += glm::row(m, 0) == glm::vec4( 0,  1,  2,  3) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec4( 4,  5,  6,  7) ? 0 : 1;
+    Error += glm::row(m, 2) == glm::vec4( 8,  9, 10, 11) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x3_col_set()
+{
+    int Error = 0;
+    
+    glm::mat4x3 m(1);
+    
+	m = glm::column(m, 0, glm::vec3( 0,  1,  2));
+	m = glm::column(m, 1, glm::vec3( 4,  5,  6));
+	m = glm::column(m, 2, glm::vec3( 8,  9, 10));
+	m = glm::column(m, 3, glm::vec3(12, 13, 14));
+
+    Error += glm::column(m, 0) == glm::vec3( 0,  1,  2) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec3( 4,  5,  6) ? 0 : 1;
+    Error += glm::column(m, 2) == glm::vec3( 8,  9, 10) ? 0 : 1;
+    Error += glm::column(m, 3) == glm::vec3(12, 13, 14) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x4_row_set()
+{
+    int Error = 0;
+    
+    glm::mat4 m(1);
+    
+	m = glm::row(m, 0, glm::vec4( 0,  1,  2,  3));
+	m = glm::row(m, 1, glm::vec4( 4,  5,  6,  7));
+	m = glm::row(m, 2, glm::vec4( 8,  9, 10, 11));
+	m = glm::row(m, 3, glm::vec4(12, 13, 14, 15));
+
+    Error += glm::row(m, 0) == glm::vec4( 0,  1,  2,  3) ? 0 : 1;
+    Error += glm::row(m, 1) == glm::vec4( 4,  5,  6,  7) ? 0 : 1;
+    Error += glm::row(m, 2) == glm::vec4( 8,  9, 10, 11) ? 0 : 1;
+    Error += glm::row(m, 3) == glm::vec4(12, 13, 14, 15) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x4_col_set()
+{
+    int Error = 0;
+    
+    glm::mat4 m(1);
+    
+	m = glm::column(m, 0, glm::vec4( 0,  1,  2,  3));
+	m = glm::column(m, 1, glm::vec4( 4,  5,  6,  7));
+	m = glm::column(m, 2, glm::vec4( 8,  9, 10, 11));
+	m = glm::column(m, 3, glm::vec4(12, 13, 14, 15));
+
+    Error += glm::column(m, 0) == glm::vec4( 0,  1,  2,  3) ? 0 : 1;
+    Error += glm::column(m, 1) == glm::vec4( 4,  5,  6,  7) ? 0 : 1;
+    Error += glm::column(m, 2) == glm::vec4( 8,  9, 10, 11) ? 0 : 1;
+    Error += glm::column(m, 3) == glm::vec4(12, 13, 14, 15) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x4_row_get()
+{
+    int Error = 0;
+    
+    glm::mat4 m(1);
+    
+    glm::vec4 A = glm::row(m, 0);
+    Error += A == glm::vec4(1, 0, 0, 0) ? 0 : 1;
+    glm::vec4 B = glm::row(m, 1);
+    Error += B == glm::vec4(0, 1, 0, 0) ? 0 : 1;
+    glm::vec4 C = glm::row(m, 2);
+    Error += C == glm::vec4(0, 0, 1, 0) ? 0 : 1;
+    glm::vec4 D = glm::row(m, 3);
+    Error += D == glm::vec4(0, 0, 0, 1) ? 0 : 1;
+
+    return Error;
+}
+
+int test_mat4x4_col_get()
+{
+    int Error = 0;
+    
+    glm::mat4 m(1);
+    
+    glm::vec4 A = glm::column(m, 0);
+    Error += A == glm::vec4(1, 0, 0, 0) ? 0 : 1;
+    glm::vec4 B = glm::column(m, 1);
+    Error += B == glm::vec4(0, 1, 0, 0) ? 0 : 1;
+    glm::vec4 C = glm::column(m, 2);
+    Error += C == glm::vec4(0, 0, 1, 0) ? 0 : 1;
+    glm::vec4 D = glm::column(m, 3);
+    Error += D == glm::vec4(0, 0, 0, 1) ? 0 : 1;
+    
+    return Error;    
+}
 
 int main()
 {
-	int Failed = 0;
+	int Error = 0;
+
+	Error += test_mat2x2_row_set();
+    Error += test_mat2x2_col_set();
+	Error += test_mat2x3_row_set();
+    Error += test_mat2x3_col_set();
+	Error += test_mat2x4_row_set();
+    Error += test_mat2x4_col_set();
+	Error += test_mat3x2_row_set();
+    Error += test_mat3x2_col_set();
+	Error += test_mat3x3_row_set();
+    Error += test_mat3x3_col_set();
+	Error += test_mat3x4_row_set();
+    Error += test_mat3x4_col_set();
+	Error += test_mat4x2_row_set();
+    Error += test_mat4x2_col_set();
+	Error += test_mat4x3_row_set();
+    Error += test_mat4x3_col_set();
+	Error += test_mat4x4_row_set();
+    Error += test_mat4x4_col_set();
+
+    Error += test_mat4x4_row_get();
+    Error += test_mat4x4_col_get();
 
-	return Failed;
+	return Error;
 }

+ 2 - 3
test/gtc/gtc_matrix_inverse.cpp

@@ -4,12 +4,11 @@
 // Created : 2010-09-16
 // Updated : 2010-09-16
 // Licence : This source is under MIT licence
-// File    : test/gtc/matrix_transform.cpp
+// File    : test/gtc/matrix_inverse.cpp
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#define GLM_MESSAGES
 #include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/matrix_inverse.hpp>
 
 int main()
 {

+ 4 - 5
test/gtc/gtc_quaternion.cpp

@@ -2,18 +2,17 @@
 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Created : 2010-09-16
-// Updated : 2010-09-16
+// Updated : 2010-05-07
 // Licence : This source is under MIT licence
-// File    : test/gtc/matrix_transform.cpp
+// File    : test/gtc/quaternion.cpp
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#define GLM_MESSAGES
 #include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/quaternion.hpp>
 
 int main()
 {
-	int Error = -1;
+	int Error = 0;
 
 	return Error;
 }

+ 136 - 157
test/gtc/gtc_type_precision.cpp

@@ -2,189 +2,168 @@
 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Created : 2010-09-16
-// Updated : 2011-05-06
+// Updated : 2011-05-08
 // Licence : This source is under MIT licence
 // File    : test/gtc/type_precision.cpp
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#define GLM_MESSAGES
 #include <glm/glm.hpp>
 #include <glm/gtc/type_precision.hpp>
 
-/*
-//typedef i8									i8vec1;		//!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<i8>					i8vec2;     //!< \brief 8bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<i8>					i8vec3;     //!< \brief 8bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<i8>					i8vec4;     //!< \brief 8bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef i16									i16vec1;	//!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<i16>					i16vec2;    //!< \brief 16bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<i16>					i16vec3;    //!< \brief 16bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<i16>					i16vec4;    //!< \brief 16bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef i32									i32vec1;	//!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<i32>					i32vec2;    //!< \brief 32bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<i32>					i32vec3;    //!< \brief 32bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<i32>					i32vec4;    //!< \brief 32bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef i64									i64vec1;	//!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<i64>					i64vec2;    //!< \brief 64bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<i64>					i64vec3;    //!< \brief 64bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<i64>					i64vec4;    //!< \brief 64bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-/////////////////////////////
-// Unsigned int vector types 
-
-
-//typedef u8									u8vec1;		//!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<u8>					u8vec2;     //!< \brief 8bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<u8>					u8vec3;     //!< \brief 8bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<u8>					u8vec4;     //!< \brief 8bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef u16									u16vec1;    //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<u16>					u16vec2;    //!< \brief 16bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<u16>					u16vec3;    //!< \brief 16bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<u16>					u16vec4;    //!< \brief 16bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef u32									u32vec1;    //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<u32>					u32vec2;    //!< \brief 32bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<u32>					u32vec3;    //!< \brief 32bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<u32>					u32vec4;    //!< \brief 32bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef u64									u64vec1;    //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<u64>					u64vec2;    //!< \brief 64bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<u64>					u64vec3;    //!< \brief 64bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<u64>					u64vec4;    //!< \brief 64bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef f16									f16vec1;    //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<f16>					f16vec2;    //!< \brief Half-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<f16>					f16vec3;    //!< \brief Half-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<f16>					f16vec4;    //!< \brief Half-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef f32									f32vec1;    //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<f32>					f32vec2;    //!< \brief Single-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<f32>					f32vec3;    //!< \brief Single-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<f32>					f32vec4;    //!< \brief Single-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//typedef f64									f64vec1;    //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tvec2<f64>					f64vec2;    //!< \brief Double-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec3<f64>					f64vec3;    //!< \brief Double-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension)
-typedef detail::tvec4<f64>					f64vec4;    //!< \brief Double-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension)
-
-//////////////////////
-// Float matrix types 
-
-//typedef f32									fmat1;	//!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f32>				fmat2;	//!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f32>				fmat3;	//!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f32>				fmat4;	//!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
-
-//typedef f32									fmat1x1;	//!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f32>				fmat2x2;  //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x3<f32>				fmat2x3;	//!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x4<f32>				fmat2x4;	//!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x2<f32>				fmat3x2;	//!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f32>				fmat3x3;	//!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x4<f32>				fmat3x4;	//!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x2<f32>				fmat4x2;	//!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x3<f32>				fmat4x3;	//!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f32>				fmat4x4;	//!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
-
-//typedef f16									f16mat1;    //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f16>				f16mat2;	//!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f16>				f16mat3;	//!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f16>				f16mat4;	//!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
+static int test_scalar_size()
+{
+	int Error = 0;
+    Error += sizeof(glm::int8) != 1;
+    Error += sizeof(glm::int16) != 2;
+    Error += sizeof(glm::int32) != 4;
+    Error += sizeof(glm::int64) != 8;
+    Error += sizeof(glm::uint8) != 1;
+    Error += sizeof(glm::uint16) != 2;
+    Error += sizeof(glm::uint32) != 4;
+    Error += sizeof(glm::uint64) != 8;
+    Error += sizeof(glm::float16) != 2;
+    Error += sizeof(glm::float32) != 4;
+    Error += sizeof(glm::float64) != 8;
+	return Error;
+}
 
-//typedef f16									f16mat1x1;	//!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f16>				f16mat2x2;	//!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x3<f16>				f16mat2x3;	//!< \brief Half-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x4<f16>				f16mat2x4;	//!< \brief Half-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x2<f16>				f16mat3x2;	//!< \brief Half-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f16>				f16mat3x3;	//!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x4<f16>				f16mat3x4;	//!< \brief Half-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x2<f16>				f16mat4x2;	//!< \brief Half-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x3<f16>				f16mat4x3;	//!< \brief Half-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f16>				f16mat4x4;	//!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
+static int test_fvec_size()
+{
+    int Error = 0;
+    Error += sizeof(glm::f16vec2) != 4;
+    Error += sizeof(glm::f16vec3) != 6;
+    Error += sizeof(glm::f16vec4) != 8;
+    Error += sizeof(glm::f32vec2) != 8;
+    Error += sizeof(glm::f32vec3) != 12;
+    Error += sizeof(glm::f32vec4) != 16;
+    Error += sizeof(glm::f64vec2) != 16;
+    Error += sizeof(glm::f64vec3) != 24;
+    Error += sizeof(glm::f64vec4) != 32;
+	return Error;
+}
 
-//typedef f32									f32mat1;	//!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f32>				f32mat2;	//!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f32>				f32mat3;	//!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f32>				f32mat4;	//!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
+static int test_ivec_size()
+{
+    int Error = 0;
+    Error += sizeof(glm::i8vec2) != 2;
+    Error += sizeof(glm::i8vec3) != 3;
+    Error += sizeof(glm::i8vec4) != 4;
+    Error += sizeof(glm::i16vec2) != 4;
+    Error += sizeof(glm::i16vec3) != 6;
+    Error += sizeof(glm::i16vec4) != 8;
+    Error += sizeof(glm::i32vec2) != 8;
+    Error += sizeof(glm::i32vec3) != 12;
+    Error += sizeof(glm::i32vec4) != 16;
+    Error += sizeof(glm::i64vec2) != 16;
+    Error += sizeof(glm::i64vec3) != 24;
+    Error += sizeof(glm::i64vec4) != 32;
+	return Error;
+}
 
-//typedef f32									f32mat1x1;	//!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f32>				f32mat2x2;  //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x3<f32>				f32mat2x3;	//!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x4<f32>				f32mat2x4;	//!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x2<f32>				f32mat3x2;	//!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f32>				f32mat3x3;	//!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x4<f32>				f32mat3x4;	//!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x2<f32>				f32mat4x2;	//!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x3<f32>				f32mat4x3;	//!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f32>				f32mat4x4;	//!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
+static int test_uvec_size()
+{
+    int Error = 0;
+    Error += sizeof(glm::u8vec2) != 2;
+    Error += sizeof(glm::u8vec3) != 3;
+    Error += sizeof(glm::u8vec4) != 4;
+    Error += sizeof(glm::u16vec2) != 4;
+    Error += sizeof(glm::u16vec3) != 6;
+    Error += sizeof(glm::u16vec4) != 8;
+    Error += sizeof(glm::u32vec2) != 8;
+    Error += sizeof(glm::u32vec3) != 12;
+    Error += sizeof(glm::u32vec4) != 16;
+    Error += sizeof(glm::u64vec2) != 16;
+    Error += sizeof(glm::u64vec3) != 24;
+    Error += sizeof(glm::u64vec4) != 32;
+	return Error;
+}
 
-//typedef f64									f64mat1;	//!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f64>				f64mat2;	//!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f64>				f64mat3;	//!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f64>				f64mat4;	//!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
+static int test_hmat_size()
+{
+    int Error = 0;
+    Error += sizeof(glm::f16mat2) != 8;
+    Error += sizeof(glm::f16mat3) != 18;
+    Error += sizeof(glm::f16mat4) != 32;
+    Error += sizeof(glm::f16mat2x2) != 8;
+    Error += sizeof(glm::f16mat2x3) != 12;
+    Error += sizeof(glm::f16mat2x4) != 16;
+    Error += sizeof(glm::f16mat3x2) != 12;
+    Error += sizeof(glm::f16mat3x3) != 18;
+    Error += sizeof(glm::f16mat3x4) != 24;
+    Error += sizeof(glm::f16mat4x2) != 16;
+    Error += sizeof(glm::f16mat4x3) != 24;
+    Error += sizeof(glm::f16mat4x4) != 32;
+	return Error;
+}
 
-//typedef f64									f64mat1x1;	//!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x2<f64>				f64mat2x2;	//!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x3<f64>				f64mat2x3;	//!< \brief Double-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat2x4<f64>				f64mat2x4;	//!< \brief Double-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x2<f64>				f64mat3x2;	//!< \brief Double-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x3<f64>				f64mat3x3;	//!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat3x4<f64>				f64mat3x4;	//!< \brief Double-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x2<f64>				f64mat4x2;	//!< \brief Double-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x3<f64>				f64mat4x3;	//!< \brief Double-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension)
-typedef detail::tmat4x4<f64>				f64mat4x4;	//!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension)
-*/
-static int test_scalar_size()
+static int test_fmat_size()
 {
-    return !(
-        sizeof(glm::int8) == 1 && 
-        sizeof(glm::int16) == 2 && 
-        sizeof(glm::int32) == 4 &&
-        sizeof(glm::int64) == 8 &&
-        sizeof(glm::uint8) == 1 && 
-        sizeof(glm::uint16) == 2 && 
-        sizeof(glm::uint32) == 4 &&
-        sizeof(glm::uint64) == 8 &&
-        sizeof(glm::float16) == 2 && 
-        sizeof(glm::float32) == 4 &&
-        sizeof(glm::float64) == 8);
+    int Error = 0;
+    Error += sizeof(glm::fmat2) != 16;
+    Error += sizeof(glm::fmat3) != 36;
+    Error += sizeof(glm::fmat4) != 64;
+    Error += sizeof(glm::fmat2x2) != 16;
+    Error += sizeof(glm::fmat2x3) != 24;
+    Error += sizeof(glm::fmat2x4) != 32;
+    Error += sizeof(glm::fmat3x2) != 24;
+    Error += sizeof(glm::fmat3x3) != 36;
+    Error += sizeof(glm::fmat3x4) != 48;
+    Error += sizeof(glm::fmat4x2) != 32;
+    Error += sizeof(glm::fmat4x3) != 48;
+    Error += sizeof(glm::fmat4x4) != 64;
+
+    Error += sizeof(glm::f32mat2) != 16;
+    Error += sizeof(glm::f32mat3) != 36;
+    Error += sizeof(glm::f32mat4) != 64;
+    Error += sizeof(glm::f32mat2x2) != 16;
+    Error += sizeof(glm::f32mat2x3) != 24;
+    Error += sizeof(glm::f32mat2x4) != 32;
+    Error += sizeof(glm::f32mat3x2) != 24;
+    Error += sizeof(glm::f32mat3x3) != 36;
+    Error += sizeof(glm::f32mat3x4) != 48;
+    Error += sizeof(glm::f32mat4x2) != 32;
+    Error += sizeof(glm::f32mat4x3) != 48;
+    Error += sizeof(glm::f32mat4x4) != 64;
+	return Error;
 }
 
-static int test_ivec_size()
+static int test_dmat_size()
 {
-    return !(
-        sizeof(glm::i8vec2) == 2 && 
-        sizeof(glm::i8vec3) == 3 && 
-        sizeof(glm::i8vec4) == 4 && 
-        sizeof(glm::i16vec2) == 4 && 
-        sizeof(glm::i16vec3) == 6 && 
-        sizeof(glm::i16vec4) == 8 && 
-        sizeof(glm::i32vec2) == 8 && 
-        sizeof(glm::i32vec3) == 12 && 
-        sizeof(glm::i32vec4) == 16 && 
-        sizeof(glm::i64vec2) == 16 && 
-        sizeof(glm::i64vec3) == 24 && 
-        sizeof(glm::i64vec4) == 32);
+    int Error = 0;
+    Error += sizeof(glm::f64mat2) != 32;
+    Error += sizeof(glm::f64mat3) != 72;
+    Error += sizeof(glm::f64mat4) != 128;
+    Error += sizeof(glm::f64mat2x2) != 32;
+    Error += sizeof(glm::f64mat2x3) != 48;
+    Error += sizeof(glm::f64mat2x4) != 64;
+    Error += sizeof(glm::f64mat3x2) != 48;
+    Error += sizeof(glm::f64mat3x3) != 72;
+    Error += sizeof(glm::f64mat3x4) != 96;
+    Error += sizeof(glm::f64mat4x2) != 64;
+    Error += sizeof(glm::f64mat4x3) != 96;
+    Error += sizeof(glm::f64mat4x4) != 128;
+	return Error;
 }
 
 static int test_quat_size()
 {
-    return !(
-        sizeof(glm::f16quat) == 8 && 
-        sizeof(glm::f32quat) == 16 && 
-        sizeof(glm::f64quat) == 32);
+    int Error = 0;
+    Error += sizeof(glm::f16quat) != 8; 
+    Error += sizeof(glm::f32quat) != 16; 
+    Error += sizeof(glm::f64quat) != 32;
+	return Error;
 }
 
 int main()
 {
 	int Error = 0;
     Error += test_scalar_size();
-    //Error += test_mat_size();
+	Error += test_fvec_size();
     Error += test_ivec_size();
-    Error += test_quat_size();
+	Error += test_uvec_size();
+	Error += test_hmat_size();
+	Error += test_fmat_size();
+	Error += test_dmat_size();
+	Error += test_quat_size();
 	return Error;
 }