Browse Source

Added forward declarations (glm/fwd.hpp) for faster compilations, issue #56

Christophe Riccio 12 years ago
parent
commit
afb7779baf
4 changed files with 6 additions and 22 deletions
  1. 2 19
      glm/fwd.hpp
  2. 0 1
      glm/glm.hpp
  3. 3 2
      glm/gtc/random.inl
  4. 1 0
      readme.txt

+ 2 - 19
glm/fwd.hpp

@@ -31,27 +31,10 @@
 
 
 #include "core/type_int.hpp"
 #include "core/type_int.hpp"
 #include "core/type_float.hpp"
 #include "core/type_float.hpp"
+#include "core/type.hpp"
 
 
-namespace glm{
-namespace detail
+namespace glm
 {
 {
-	class half;
-	
-	template <typename T> struct tvec1;
-	template <typename T> struct tvec2;
-	template <typename T> struct tvec3;
-	template <typename T> struct tvec4;
-	
-	template <typename T> struct tmat2x2;
-	template <typename T> struct tmat2x3;
-	template <typename T> struct tmat2x4;
-	template <typename T> struct tmat3x2;
-	template <typename T> struct tmat3x3;
-	template <typename T> struct tmat3x4;
-	template <typename T> struct tmat4x2;
-	template <typename T> struct tmat4x3;
-	template <typename T> struct tmat4x4;
-}//namespace detail
 
 
 }//namespace glm
 }//namespace glm
 
 

+ 0 - 1
glm/glm.hpp

@@ -95,7 +95,6 @@
 #	pragma message("GLM: Core library included")
 #	pragma message("GLM: Core library included")
 #endif//GLM_MESSAGE
 #endif//GLM_MESSAGE
 
 
-#include "./core/_detail.hpp"
 #include "./core/_vectorize.hpp"
 #include "./core/_vectorize.hpp"
 
 
 #include "./core/type_half.hpp"
 #include "./core/type_half.hpp"

+ 3 - 2
glm/gtc/random.inl

@@ -26,6 +26,7 @@
 /// @author Christophe Riccio
 /// @author Christophe Riccio
 ///////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////
 
 
+#include <cstdlib>
 #include <ctime>
 #include <ctime>
 #include <cassert>
 #include <cassert>
 
 
@@ -43,7 +44,7 @@ namespace detail
 		}
 		}
 */
 */
 	};
 	};
-    
+	
 	template <>
 	template <>
 	GLM_FUNC_QUALIFIER half compute_linearRand::operator()<half> (half const & Min, half const & Max) const
 	GLM_FUNC_QUALIFIER half compute_linearRand::operator()<half> (half const & Min, half const & Max) const
 	{
 	{
@@ -61,7 +62,7 @@ namespace detail
 	{
 	{
 		return double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min;
 		return double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min;
 	}
 	}
-    
+
 	template <>
 	template <>
 	GLM_FUNC_QUALIFIER long double compute_linearRand::operator()<long double> (long double const & Min, long double const & Max) const
 	GLM_FUNC_QUALIFIER long double compute_linearRand::operator()<long double> (long double const & Min, long double const & Max) const
 	{
 	{

+ 1 - 0
readme.txt

@@ -39,6 +39,7 @@ http://glm.g-truc.net/glm.pdf
 ================================================================================
 ================================================================================
 GLM 0.9.5.0: 2013-XX-XX
 GLM 0.9.5.0: 2013-XX-XX
 --------------------------------------------------------------------------------
 --------------------------------------------------------------------------------
+- Added forward declarations (glm/fwd.hpp) for faster compilations
 - Improved Intel Compiler detection
 - Improved Intel Compiler detection
 - Added bitfieldInterleave and _mm_bit_interleave_si128 functions
 - Added bitfieldInterleave and _mm_bit_interleave_si128 functions
 - Added GTX_scalar_relational
 - Added GTX_scalar_relational