Index: /trunk/nv/types.hh
===================================================================
--- /trunk/nv/types.hh	(revision 29)
+++ /trunk/nv/types.hh	(revision 30)
@@ -6,4 +6,5 @@
 #define NV_TYPES_HH
 
+#include <glm/glm.hpp>
 #include <nv/common.hh>
 #include <utility>
@@ -13,4 +14,65 @@
 namespace nv
 {
+	enum type
+	{
+		FLOAT,
+		FLOAT_VECTOR_2,
+		FLOAT_VECTOR_3,
+		FLOAT_VECTOR_4,
+		FLOAT_MATRIX_2,
+		FLOAT_MATRIX_3,
+		FLOAT_MATRIX_4,
+		INT,
+		INT_VECTOR_2,
+		INT_VECTOR_3,
+		INT_VECTOR_4
+	};
+
+	typedef glm::vec2 vec2;
+	typedef glm::vec3 vec3;
+	typedef glm::vec4 vec4;
+
+	typedef glm::ivec2 ivec2;
+	typedef glm::ivec3 ivec3;
+	typedef glm::ivec4 ivec4;
+
+	typedef glm::mat2 mat2;
+	typedef glm::mat3 mat3;
+	typedef glm::mat4 mat4;
+
+	template < type EnumType > struct enum_to_type {};
+
+	template <> struct enum_to_type< FLOAT > { typedef f32 type; };
+	template <> struct enum_to_type< INT >   { typedef int type; };
+
+	template <> struct enum_to_type< FLOAT_VECTOR_2 > { typedef vec2 type; };
+	template <> struct enum_to_type< FLOAT_VECTOR_3 > { typedef vec3 type; };
+	template <> struct enum_to_type< FLOAT_VECTOR_4 > { typedef vec4 type; };
+
+	template <> struct enum_to_type< INT_VECTOR_2 > { typedef ivec2 type; };
+	template <> struct enum_to_type< INT_VECTOR_3 > { typedef ivec3 type; };
+	template <> struct enum_to_type< INT_VECTOR_4 > { typedef ivec4 type; };
+
+	template <> struct enum_to_type< FLOAT_MATRIX_2 > { typedef mat2 type; };
+	template <> struct enum_to_type< FLOAT_MATRIX_3 > { typedef mat3 type; };
+	template <> struct enum_to_type< FLOAT_MATRIX_4 > { typedef mat4 type; };
+
+	template < typename Type > struct type_to_enum {};
+
+	template <> struct type_to_enum< f32 > { static const type type = FLOAT; };
+	template <> struct type_to_enum< int > { static const type type = INT; };
+
+	template <> struct type_to_enum< vec2 > { static const type type = FLOAT_VECTOR_2; };
+	template <> struct type_to_enum< vec3 > { static const type type = FLOAT_VECTOR_3; };
+	template <> struct type_to_enum< vec4 > { static const type type = FLOAT_VECTOR_4; };
+
+	template <> struct type_to_enum< ivec2 > { static const type type = INT_VECTOR_2; };
+	template <> struct type_to_enum< ivec3 > { static const type type = INT_VECTOR_3; };
+	template <> struct type_to_enum< ivec4 > { static const type type = INT_VECTOR_4; };
+
+	template <> struct type_to_enum< mat2 > { static const type type = FLOAT_MATRIX_2; };
+	template <> struct type_to_enum< mat3 > { static const type type = FLOAT_MATRIX_3; };
+	template <> struct type_to_enum< mat4 > { static const type type = FLOAT_MATRIX_4; };
+
 	template <typename TYPE>
     const char* get_type_name()
@@ -74,5 +136,5 @@
 {
 
-    struct type
+    struct type_entry
     {
 		 // Function types for the constructor and destructor of registered types
@@ -98,8 +160,8 @@
     public:
 		template< typename TYPE >
-        type& create_type()
+        type_entry& create_type()
 		{
 			hash_string name( get_type_name<TYPE>() );
-			type* i_type = nullptr;
+			type_entry* i_type = nullptr;
 			type_map::iterator it = m_types.find( name );
 			if ( it != m_types.end() ) 
@@ -107,5 +169,5 @@
 				return *(it->second);
 			}
-			i_type          = new type;
+			i_type          = new type_entry;
 			i_type->type_db = this;
 			i_type->name    = name;
@@ -118,5 +180,5 @@
 			return *i_type;
 		}
-        type* get_type( hash_string name )
+        type_entry* get_type( hash_string name )
 		{
 			type_map::iterator it = m_types.find( name );
@@ -128,5 +190,5 @@
 		}
     private:
-        typedef std::unordered_map<hash_string, type*> type_map;
+        typedef std::unordered_map<hash_string, type_entry*> type_map;
         type_map m_types;
 	};
