Browse Source

Merge branch '0.9.2' into cuda

Christophe Riccio 14 years ago
parent
commit
8ef16675b5
2 changed files with 39 additions and 2 deletions
  1. 4 0
      glm/core/setup.hpp
  2. 35 2
      test/gtc/gtc_type_ptr.cpp

+ 4 - 0
glm/core/setup.hpp

@@ -19,6 +19,7 @@
 #define GLM_VERSION_PATCH			2
 #define GLM_VERSION_PATCH			2
 #define GLM_VERSION_REVISION		0
 #define GLM_VERSION_REVISION		0
 
 
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Compiler
 // Compiler
 
 
@@ -37,6 +38,7 @@
 #define GLM_COMPILER_VC2005			0x01000070
 #define GLM_COMPILER_VC2005			0x01000070
 #define GLM_COMPILER_VC2008			0x01000080
 #define GLM_COMPILER_VC2008			0x01000080
 #define GLM_COMPILER_VC2010			0x01000090
 #define GLM_COMPILER_VC2010			0x01000090
+#define GLM_COMPILER_VC2011			0x010000A0
 
 
 // GCC defines
 // GCC defines
 #define GLM_COMPILER_GCC            0x02000000
 #define GLM_COMPILER_GCC            0x02000000
@@ -98,6 +100,8 @@
 #		define GLM_COMPILER GLM_COMPILER_VC2008
 #		define GLM_COMPILER GLM_COMPILER_VC2008
 #	elif _MSC_VER == 1600
 #	elif _MSC_VER == 1600
 #		define GLM_COMPILER GLM_COMPILER_VC2010
 #		define GLM_COMPILER GLM_COMPILER_VC2010
+#	elif _MSC_VER == 1700
+#		define GLM_COMPILER GLM_COMPILER_VC2011
 #	else//_MSC_VER
 #	else//_MSC_VER
 #		define GLM_COMPILER GLM_COMPILER_VC
 #		define GLM_COMPILER GLM_COMPILER_VC
 #	endif//_MSC_VER
 #	endif//_MSC_VER

+ 35 - 2
test/gtc/gtc_type_ptr.cpp

@@ -4,16 +4,49 @@
 // Created : 2010-09-16
 // Created : 2010-09-16
 // Updated : 2010-09-16
 // Updated : 2010-09-16
 // Licence : This source is under MIT licence
 // Licence : This source is under MIT licence
-// File    : test/gtc/matrix_transform.cpp
+// File    : test/gtc/type_ptr.cpp
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 
 #define GLM_MESSAGES
 #define GLM_MESSAGES
 #include <glm/glm.hpp>
 #include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/type_ptr.hpp>
+
+bool test_make_pointer()
+{
+    float ArrayA[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
+    int ArrayB[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
+    bool ArrayC[] = {true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false};
+    
+    glm::vec2 Vec2A = glm::make_vec2(ArrayA);
+    glm::vec3 Vec3A = glm::make_vec3(ArrayA);
+    glm::vec4 Vec4A = glm::make_vec4(ArrayA);
+    
+    glm::ivec2 Vec2B = glm::make_vec2(ArrayB);
+    glm::ivec3 Vec3B = glm::make_vec3(ArrayB);
+    glm::ivec4 Vec4B = glm::make_vec4(ArrayB);
+  
+    glm::bvec2 Vec2C = glm::make_vec2(ArrayC);
+    glm::bvec3 Vec3C = glm::make_vec3(ArrayC);
+    glm::bvec4 Vec4C = glm::make_vec4(ArrayC);
+    
+    glm::mat2x2 Mat2x2A = glm::make_mat2x2(ArrayA);
+    glm::mat2x3 Mat2x3A = glm::make_mat2x3(ArrayA);
+    glm::mat2x4 Mat2x4A = glm::make_mat2x4(ArrayA);
+    glm::mat3x2 Mat3x2A = glm::make_mat3x2(ArrayA);
+    glm::mat3x3 Mat3x3A = glm::make_mat3x3(ArrayA);
+    glm::mat3x4 Mat3x4A = glm::make_mat3x4(ArrayA);
+    glm::mat4x2 Mat4x2A = glm::make_mat4x2(ArrayA);
+    glm::mat4x3 Mat4x3A = glm::make_mat4x3(ArrayA);
+    glm::mat4x4 Mat4x4A = glm::make_mat4x4(ArrayA);
+    
+    return true;
+}
 
 
 int main()
 int main()
 {
 {
 	int Failed = 0;
 	int Failed = 0;
+    
+    Failed += test_make_pointer() ? 0 : 1;
 
 
 	return Failed;
 	return Failed;
 }
 }