From 5d09d8342a3651bc6464a7411b1ccd4e242cb167 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 7 May 2011 15:37:51 +0100 Subject: [PATCH] Fixed CUDA support for functions member of classes --- glm/core/setup.hpp | 9 ++-- glm/core/type_half.hpp | 26 +++++----- glm/core/type_mat2x2.hpp | 64 ++++++++++++------------ glm/core/type_mat2x3.hpp | 56 ++++++++++----------- glm/core/type_mat2x4.hpp | 60 +++++++++++----------- glm/core/type_mat3x2.hpp | 60 +++++++++++----------- glm/core/type_mat3x3.hpp | 64 ++++++++++++------------ glm/core/type_mat3x4.hpp | 56 ++++++++++----------- glm/core/type_mat4x2.hpp | 60 +++++++++++----------- glm/core/type_mat4x3.hpp | 56 ++++++++++----------- glm/core/type_mat4x4.hpp | 64 ++++++++++++------------ glm/core/type_vec1.hpp | 90 ++++++++++++++++----------------- glm/core/type_vec2.hpp | 94 +++++++++++++++++------------------ glm/core/type_vec3.hpp | 98 ++++++++++++++++++------------------ glm/core/type_vec4.hpp | 104 +++++++++++++++++++-------------------- 15 files changed, 482 insertions(+), 479 deletions(-) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 6945bbc6..a90095fb 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -400,9 +400,11 @@ // User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA #if(defined(GLM_FORCE_CUDA) || (defined(GLM_COMPILER) && (GLM_COMPILER >= GLM_COMPILER_CUDA30))) -# define GLM_CUDA_QUALIFIER __device__ __host__ +# define GLM_CUDA_FUNC_DEF __device__ __host__ +# define GLM_CUDA_FUNC_DECL __device__ __host__ #else -# define GLM_CUDA_QUALIFIER +# define GLM_CUDA_FUNC_DEF +# define GLM_CUDA_FUNC_DECL #endif #if(defined(GLM_FORCE_INLINE)) @@ -417,7 +419,8 @@ # define GLM_INLINE inline #endif//defined(GLM_FORCE_INLINE) -#define GLM_FUNC_QUALIFIER GLM_CUDA_QUALIFIER GLM_INLINE +#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL +#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE /////////////////////////////////////////////////////////////////////////////////////////////////// // Swizzle operators diff --git a/glm/core/type_half.hpp b/glm/core/type_half.hpp index cc8fed60..00a90157 100644 --- a/glm/core/type_half.hpp +++ b/glm/core/type_half.hpp @@ -33,30 +33,30 @@ namespace glm { public: // Constructors - thalf(); - thalf(thalf const & s); + GLM_FUNC_DECL thalf(); + GLM_FUNC_DECL thalf(thalf const & s); template - explicit thalf(U const & s); + GLM_FUNC_DECL explicit thalf(U const & s); // Cast //operator float(); - operator float() const; + GLM_FUNC_DECL operator float() const; //operator double(); //operator double() const; // Unary updatable operators - thalf& operator= (thalf const & s); - thalf& operator+=(thalf const & s); - thalf& operator-=(thalf const & s); - thalf& operator*=(thalf const & s); - thalf& operator/=(thalf const & s); - thalf& operator++(); - thalf& operator--(); + GLM_FUNC_DECL thalf& operator= (thalf const & s); + GLM_FUNC_DECL thalf& operator+=(thalf const & s); + GLM_FUNC_DECL thalf& operator-=(thalf const & s); + GLM_FUNC_DECL thalf& operator*=(thalf const & s); + GLM_FUNC_DECL thalf& operator/=(thalf const & s); + GLM_FUNC_DECL thalf& operator++(); + GLM_FUNC_DECL thalf& operator--(); - float toFloat() const{return toFloat32(data);} + GLM_FUNC_DECL float toFloat() const{return toFloat32(data);} - hdata _data() const{return data;} + GLM_FUNC_DECL hdata _data() const{return data;} private: hdata data; diff --git a/glm/core/type_mat2x2.hpp b/glm/core/type_mat2x2.hpp index aecd36e0..aade1ef4 100644 --- a/glm/core/type_mat2x2.hpp +++ b/glm/core/type_mat2x2.hpp @@ -45,15 +45,15 @@ namespace glm typedef std::size_t size_type; typedef tvec2 col_type; typedef tvec2 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat2x2 type; typedef tmat2x2 transpose_type; public: // Implementation detail - tmat2x2 _inverse() const; + GLM_FUNC_DECL tmat2x2 _inverse() const; private: // Data @@ -61,62 +61,62 @@ namespace glm public: // Constructors - tmat2x2(); - tmat2x2( + GLM_FUNC_DECL tmat2x2(); + GLM_FUNC_DECL tmat2x2( tmat2x2 const & m); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( ctor Null); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( value_type const & x); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( value_type const & x1, value_type const & y1, value_type const & x2, value_type const & y2); - explicit tmat2x2( + GLM_FUNC_DECL explicit tmat2x2( col_type const & v1, col_type const & v2); // Conversions template - explicit tmat2x2(tmat2x2 const & m); + GLM_FUNC_DECL explicit tmat2x2(tmat2x2 const & m); - explicit tmat2x2(tmat3x3 const & x); - explicit tmat2x2(tmat4x4 const & x); - explicit tmat2x2(tmat2x3 const & x); - explicit tmat2x2(tmat3x2 const & x); - explicit tmat2x2(tmat2x4 const & x); - explicit tmat2x2(tmat4x2 const & x); - explicit tmat2x2(tmat3x4 const & x); - explicit tmat2x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x3 const & x); ////////////////////////////////////// // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat2x2 & operator=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); template - tmat2x2 & operator=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); template - tmat2x2 & operator+=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator+=(U const & s); template - tmat2x2 & operator+=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator+=(tmat2x2 const & m); template - tmat2x2 & operator-=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator-=(U const & s); template - tmat2x2 & operator-=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator-=(tmat2x2 const & m); template - tmat2x2 & operator*=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator*=(U const & s); template - tmat2x2 & operator*=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator*=(tmat2x2 const & m); template - tmat2x2 & operator/=(U const & s); + GLM_FUNC_DECL tmat2x2 & operator/=(U const & s); template - tmat2x2 & operator/=(tmat2x2 const & m); - tmat2x2 & operator++(); - tmat2x2 & operator--(); + GLM_FUNC_DECL tmat2x2 & operator/=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator++(); + GLM_FUNC_DECL tmat2x2 & operator--(); }; // Binary operators diff --git a/glm/core/type_mat2x3.hpp b/glm/core/type_mat2x3.hpp index 647d1ebe..ed87f9e2 100644 --- a/glm/core/type_mat2x3.hpp +++ b/glm/core/type_mat2x3.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec3 col_type; typedef tvec2 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat2x3 type; typedef tmat3x2 transpose_type; @@ -57,58 +57,58 @@ namespace glm public: // Constructors - tmat2x3(); - tmat2x3(tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3(); + GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( ctor); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( value_type const & s); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & x1, value_type const & y1, value_type const & z1); - explicit tmat2x3( + GLM_FUNC_DECL explicit tmat2x3( col_type const & v0, col_type const & v1); // Conversion template - explicit tmat2x3(tmat2x3 const & m); + GLM_FUNC_DECL explicit tmat2x3(tmat2x3 const & m); - explicit tmat2x3(tmat2x2 const & x); - explicit tmat2x3(tmat3x3 const & x); - explicit tmat2x3(tmat4x4 const & x); - explicit tmat2x3(tmat2x4 const & x); - explicit tmat2x3(tmat3x2 const & x); - explicit tmat2x3(tmat3x4 const & x); - explicit tmat2x3(tmat4x2 const & x); - explicit tmat2x3(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x3 const & x); // Accesses col_type & operator[](size_type i); col_type const & operator[](size_type i) const; // Unary updatable operators - tmat2x3 & operator= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); template - tmat2x3 & operator= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); template - tmat2x3 & operator+= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator+= (U const & s); template - tmat2x3 & operator+= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator+= (tmat2x3 const & m); template - tmat2x3 & operator-= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator-= (U const & s); template - tmat2x3 & operator-= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator-= (tmat2x3 const & m); template - tmat2x3 & operator*= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator*= (U const & s); template - tmat2x3 & operator*= (tmat2x3 const & m); + GLM_FUNC_DECL tmat2x3 & operator*= (tmat2x3 const & m); template - tmat2x3 & operator/= (U const & s); + GLM_FUNC_DECL tmat2x3 & operator/= (U const & s); - tmat2x3 & operator++ (); - tmat2x3 & operator-- (); + GLM_FUNC_DECL tmat2x3 & operator++ (); + GLM_FUNC_DECL tmat2x3 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat2x4.hpp b/glm/core/type_mat2x4.hpp index e0c00ffb..a14cc033 100644 --- a/glm/core/type_mat2x4.hpp +++ b/glm/core/type_mat2x4.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec4 col_type; typedef tvec2 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat2x4 type; typedef tmat4x2 transpose_type; @@ -57,58 +57,58 @@ namespace glm public: // Constructors - tmat2x4(); - tmat2x4(tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4(); + GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( ctor); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( value_type const & s); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1); - explicit tmat2x4( + GLM_FUNC_DECL explicit tmat2x4( col_type const & v0, col_type const & v1); // Conversion template - explicit tmat2x4(tmat2x4 const & m); + GLM_FUNC_DECL explicit tmat2x4(tmat2x4 const & m); - explicit tmat2x4(tmat2x2 const & x); - explicit tmat2x4(tmat3x3 const & x); - explicit tmat2x4(tmat4x4 const & x); - explicit tmat2x4(tmat2x3 const & x); - explicit tmat2x4(tmat3x2 const & x); - explicit tmat2x4(tmat3x4 const & x); - explicit tmat2x4(tmat4x2 const & x); - explicit tmat2x4(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat2x4& operator= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); template - tmat2x4& operator= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); template - tmat2x4& operator+= (U const & s); + GLM_FUNC_DECL tmat2x4& operator+= (U const & s); template - tmat2x4& operator+= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator+= (tmat2x4 const & m); template - tmat2x4& operator-= (U const & s); + GLM_FUNC_DECL tmat2x4& operator-= (U const & s); template - tmat2x4& operator-= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator-= (tmat2x4 const & m); template - tmat2x4& operator*= (U const & s); + GLM_FUNC_DECL tmat2x4& operator*= (U const & s); template - tmat2x4& operator*= (tmat2x4 const & m); + GLM_FUNC_DECL tmat2x4& operator*= (tmat2x4 const & m); template - tmat2x4& operator/= (U const & s); + GLM_FUNC_DECL tmat2x4& operator/= (U const & s); - tmat2x4& operator++ (); - tmat2x4& operator-- (); + GLM_FUNC_DECL tmat2x4& operator++ (); + GLM_FUNC_DECL tmat2x4& operator-- (); }; // Binary operators diff --git a/glm/core/type_mat3x2.hpp b/glm/core/type_mat3x2.hpp index 5a2bd8f0..3457b72f 100644 --- a/glm/core/type_mat3x2.hpp +++ b/glm/core/type_mat3x2.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec2 col_type; typedef tvec3 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat3x2 type; typedef tmat2x3 transpose_type; @@ -57,60 +57,60 @@ namespace glm public: // Constructors - tmat3x2(); - tmat3x2(tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2(); + GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( ctor); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( value_type const & s); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( value_type const & x0, value_type const & y0, value_type const & x1, value_type const & y1, value_type const & x2, value_type const & y2); - explicit tmat3x2( + GLM_FUNC_DECL explicit tmat3x2( col_type const & v0, col_type const & v1, col_type const & v2); // Conversion template - explicit tmat3x2(tmat3x2 const & m); + GLM_FUNC_DECL explicit tmat3x2(tmat3x2 const & m); - explicit tmat3x2(tmat2x2 const & x); - explicit tmat3x2(tmat3x3 const & x); - explicit tmat3x2(tmat4x4 const & x); - explicit tmat3x2(tmat2x3 const & x); - explicit tmat3x2(tmat2x4 const & x); - explicit tmat3x2(tmat3x4 const & x); - explicit tmat3x2(tmat4x2 const & x); - explicit tmat3x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat3x2 & operator= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); template - tmat3x2 & operator= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); template - tmat3x2 & operator+= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator+= (U const & s); template - tmat3x2 & operator+= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator+= (tmat3x2 const & m); template - tmat3x2 & operator-= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator-= (U const & s); template - tmat3x2 & operator-= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator-= (tmat3x2 const & m); template - tmat3x2 & operator*= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator*= (U const & s); template - tmat3x2 & operator*= (tmat3x2 const & m); + GLM_FUNC_DECL tmat3x2 & operator*= (tmat3x2 const & m); template - tmat3x2 & operator/= (U const & s); + GLM_FUNC_DECL tmat3x2 & operator/= (U const & s); - tmat3x2 & operator++ (); - tmat3x2 & operator-- (); + GLM_FUNC_DECL tmat3x2 & operator++ (); + GLM_FUNC_DECL tmat3x2 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat3x3.hpp b/glm/core/type_mat3x3.hpp index e5edfaff..bf18c167 100644 --- a/glm/core/type_mat3x3.hpp +++ b/glm/core/type_mat3x3.hpp @@ -45,15 +45,15 @@ namespace glm typedef std::size_t size_type; typedef tvec3 col_type; typedef tvec3 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat3x3 type; typedef tmat3x3 transpose_type; public: // Implementation detail - tmat3x3 _inverse() const; + GLM_FUNC_DECL tmat3x3 _inverse() const; private: // Data @@ -61,61 +61,61 @@ namespace glm public: // Constructors - tmat3x3(); - tmat3x3(tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3(); + GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( ctor Null); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( value_type const & s); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & x2, value_type const & y2, value_type const & z2); - explicit tmat3x3( + GLM_FUNC_DECL explicit tmat3x3( col_type const & v0, col_type const & v1, col_type const & v2); // Conversions template - explicit tmat3x3(tmat3x3 const & m); + GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); - explicit tmat3x3(tmat2x2 const & x); - explicit tmat3x3(tmat4x4 const & x); - explicit tmat3x3(tmat2x3 const & x); - explicit tmat3x3(tmat3x2 const & x); - explicit tmat3x3(tmat2x4 const & x); - explicit tmat3x3(tmat4x2 const & x); - explicit tmat3x3(tmat3x4 const & x); - explicit tmat3x3(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat3x3& operator= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); template - tmat3x3& operator= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); template - tmat3x3& operator+= (U const & s); + GLM_FUNC_DECL tmat3x3& operator+= (U const & s); template - tmat3x3& operator+= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator+= (tmat3x3 const & m); template - tmat3x3& operator-= (U const & s); + GLM_FUNC_DECL tmat3x3& operator-= (U const & s); template - tmat3x3& operator-= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator-= (tmat3x3 const & m); template - tmat3x3& operator*= (U const & s); + GLM_FUNC_DECL tmat3x3& operator*= (U const & s); template - tmat3x3& operator*= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator*= (tmat3x3 const & m); template - tmat3x3& operator/= (U const & s); + GLM_FUNC_DECL tmat3x3& operator/= (U const & s); template - tmat3x3& operator/= (tmat3x3 const & m); - tmat3x3& operator++ (); - tmat3x3& operator-- (); + GLM_FUNC_DECL tmat3x3& operator/= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator++ (); + GLM_FUNC_DECL tmat3x3& operator-- (); }; // Binary operators diff --git a/glm/core/type_mat3x4.hpp b/glm/core/type_mat3x4.hpp index 6f68b4cd..1f84ec7b 100644 --- a/glm/core/type_mat3x4.hpp +++ b/glm/core/type_mat3x4.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec4 col_type; typedef tvec3 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat3x4 type; typedef tmat4x3 transpose_type; @@ -57,60 +57,60 @@ namespace glm public: // Constructors - tmat3x4(); - tmat3x4(tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4(); + GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( ctor Null); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( value_type const & s); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2); - explicit tmat3x4( + GLM_FUNC_DECL explicit tmat3x4( col_type const & v0, col_type const & v1, col_type const & v2); // Conversion template - explicit tmat3x4(tmat3x4 const & m); + GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); - explicit tmat3x4(tmat2x2 const & x); - explicit tmat3x4(tmat3x3 const & x); - explicit tmat3x4(tmat4x4 const & x); - explicit tmat3x4(tmat2x3 const & x); - explicit tmat3x4(tmat3x2 const & x); - explicit tmat3x4(tmat2x4 const & x); - explicit tmat3x4(tmat4x2 const & x); - explicit tmat3x4(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x3 const & x); // Accesses col_type & operator[](size_type i); col_type const & operator[](size_type i) const; // Unary updatable operators - tmat3x4 & operator= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); template - tmat3x4 & operator= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); template - tmat3x4 & operator+= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator+= (U const & s); template - tmat3x4 & operator+= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator+= (tmat3x4 const & m); template - tmat3x4 & operator-= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator-= (U const & s); template - tmat3x4 & operator-= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator-= (tmat3x4 const & m); template - tmat3x4 & operator*= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator*= (U const & s); template - tmat3x4 & operator*= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator*= (tmat3x4 const & m); template - tmat3x4 & operator/= (U const & s); + GLM_FUNC_DECL tmat3x4 & operator/= (U const & s); - tmat3x4 & operator++ (); - tmat3x4 & operator-- (); + GLM_FUNC_DECL tmat3x4 & operator++ (); + GLM_FUNC_DECL tmat3x4 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat4x2.hpp b/glm/core/type_mat4x2.hpp index 3d90e3ac..3354ce8e 100644 --- a/glm/core/type_mat4x2.hpp +++ b/glm/core/type_mat4x2.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec2 col_type; typedef tvec4 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat4x2 type; typedef tmat2x4 transpose_type; @@ -57,19 +57,19 @@ namespace glm public: // Constructors - tmat4x2(); - tmat4x2(tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2(); + GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( ctor Null); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( value_type const & x); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( value_type const & x0, value_type const & y0, value_type const & x1, value_type const & y1, value_type const & x2, value_type const & y2, value_type const & x3, value_type const & y3); - explicit tmat4x2( + GLM_FUNC_DECL explicit tmat4x2( col_type const & v0, col_type const & v1, col_type const & v2, @@ -77,42 +77,42 @@ namespace glm // Conversions template - explicit tmat4x2(tmat4x2 const & m); + GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); - explicit tmat4x2(tmat2x2 const & x); - explicit tmat4x2(tmat3x3 const & x); - explicit tmat4x2(tmat4x4 const & x); - explicit tmat4x2(tmat2x3 const & x); - explicit tmat4x2(tmat3x2 const & x); - explicit tmat4x2(tmat2x4 const & x); - explicit tmat4x2(tmat4x3 const & x); - explicit tmat4x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x4 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat4x2& operator= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); template - tmat4x2& operator= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); template - tmat4x2& operator+= (U const & s); + GLM_FUNC_DECL tmat4x2& operator+= (U const & s); template - tmat4x2& operator+= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator+= (tmat4x2 const & m); template - tmat4x2& operator-= (U const & s); + GLM_FUNC_DECL tmat4x2& operator-= (U const & s); template - tmat4x2& operator-= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator-= (tmat4x2 const & m); template - tmat4x2& operator*= (U const & s); + GLM_FUNC_DECL tmat4x2& operator*= (U const & s); template - tmat4x2& operator*= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator*= (tmat4x2 const & m); template - tmat4x2& operator/= (U const & s); + GLM_FUNC_DECL tmat4x2& operator/= (U const & s); - tmat4x2& operator++ (); - tmat4x2& operator-- (); + GLM_FUNC_DECL tmat4x2& operator++ (); + GLM_FUNC_DECL tmat4x2& operator-- (); }; // Binary operators diff --git a/glm/core/type_mat4x3.hpp b/glm/core/type_mat4x3.hpp index d9a311ad..b15a3c30 100644 --- a/glm/core/type_mat4x3.hpp +++ b/glm/core/type_mat4x3.hpp @@ -45,8 +45,8 @@ namespace glm typedef std::size_t size_type; typedef tvec3 col_type; typedef tvec4 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat4x3 type; typedef tmat3x4 transpose_type; @@ -57,19 +57,19 @@ namespace glm public: // Constructors - tmat4x3(); - tmat4x3(tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3(); + GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( ctor Null); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( value_type const & x); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & x2, value_type const & y2, value_type const & z2, value_type const & x3, value_type const & y3, value_type const & z3); - explicit tmat4x3( + GLM_FUNC_DECL explicit tmat4x3( col_type const & v0, col_type const & v1, col_type const & v2, @@ -77,42 +77,42 @@ namespace glm // Conversion template - explicit tmat4x3(tmat4x3 const & m); + GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); - explicit tmat4x3(tmat2x2 const & x); - explicit tmat4x3(tmat3x3 const & x); - explicit tmat4x3(tmat4x4 const & x); - explicit tmat4x3(tmat2x3 const & x); - explicit tmat4x3(tmat3x2 const & x); - explicit tmat4x3(tmat2x4 const & x); - explicit tmat4x3(tmat4x2 const & x); - explicit tmat4x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x4 const & x); // Accesses col_type & operator[](size_type i); col_type const & operator[](size_type i) const; // Unary updatable operators - tmat4x3 & operator= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); template - tmat4x3 & operator= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); template - tmat4x3 & operator+= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator+= (U const & s); template - tmat4x3 & operator+= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator+= (tmat4x3 const & m); template - tmat4x3 & operator-= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator-= (U const & s); template - tmat4x3 & operator-= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator-= (tmat4x3 const & m); template - tmat4x3 & operator*= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator*= (U const & s); template - tmat4x3 & operator*= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator*= (tmat4x3 const & m); template - tmat4x3 & operator/= (U const & s); + GLM_FUNC_DECL tmat4x3 & operator/= (U const & s); - tmat4x3 & operator++ (); - tmat4x3 & operator-- (); + GLM_FUNC_DECL tmat4x3 & operator++ (); + GLM_FUNC_DECL tmat4x3 & operator-- (); }; // Binary operators diff --git a/glm/core/type_mat4x4.hpp b/glm/core/type_mat4x4.hpp index 05325a1e..6aa1f68a 100644 --- a/glm/core/type_mat4x4.hpp +++ b/glm/core/type_mat4x4.hpp @@ -45,15 +45,15 @@ namespace glm typedef std::size_t size_type; typedef tvec4 col_type; typedef tvec4 row_type; - static size_type col_size(); - static size_type row_size(); + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); typedef tmat4x4 type; typedef tmat4x4 transpose_type; public: // Implementation detail - tmat4x4 _inverse() const; + GLM_FUNC_DECL tmat4x4 _inverse() const; private: // Data @@ -61,19 +61,19 @@ namespace glm public: // Constructors - tmat4x4(); - tmat4x4(tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4(); + GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( ctor Null); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( value_type const & x); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3); - explicit tmat4x4( + GLM_FUNC_DECL explicit tmat4x4( col_type const & v0, col_type const & v1, col_type const & v2, @@ -81,43 +81,43 @@ namespace glm // Conversions template - explicit tmat4x4(tmat4x4 const & m); + GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); - explicit tmat4x4(tmat2x2 const & x); - explicit tmat4x4(tmat3x3 const & x); - explicit tmat4x4(tmat2x3 const & x); - explicit tmat4x4(tmat3x2 const & x); - explicit tmat4x4(tmat2x4 const & x); - explicit tmat4x4(tmat4x2 const & x); - explicit tmat4x4(tmat3x4 const & x); - explicit tmat4x4(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x3 const & x); // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; // Unary updatable operators - tmat4x4 & operator= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); template - tmat4x4 & operator= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); template - tmat4x4 & operator+= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator+= (U const & s); template - tmat4x4 & operator+= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator+= (tmat4x4 const & m); template - tmat4x4 & operator-= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator-= (U const & s); template - tmat4x4 & operator-= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator-= (tmat4x4 const & m); template - tmat4x4 & operator*= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator*= (U const & s); template - tmat4x4 & operator*= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator*= (tmat4x4 const & m); template - tmat4x4 & operator/= (U const & s); + GLM_FUNC_DECL tmat4x4 & operator/= (U const & s); template - tmat4x4 & operator/= (tmat4x4 const & m); - tmat4x4 & operator++ (); - tmat4x4 & operator-- (); + GLM_FUNC_DECL tmat4x4 & operator/= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator++ (); + GLM_FUNC_DECL tmat4x4 & operator-- (); }; // Binary operators diff --git a/glm/core/type_vec1.hpp b/glm/core/type_vec1.hpp index 2b3ad663..5dcbca88 100644 --- a/glm/core/type_vec1.hpp +++ b/glm/core/type_vec1.hpp @@ -41,7 +41,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec1 type; typedef tvec1 bool_type; @@ -58,99 +58,99 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec1(); - tvec1(tvec1 const & v); + GLM_FUNC_DECL tvec1(); + GLM_FUNC_DECL tvec1(tvec1 const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec1( + GLM_FUNC_DECL explicit tvec1( ctor); - explicit tvec1( + GLM_FUNC_DECL explicit tvec1( value_type const & s); ////////////////////////////////////// // Swizzle constructors - tvec1(tref1 const & r); + GLM_FUNC_DECL tvec1(tref1 const & r); ////////////////////////////////////// // Convertion scalar constructors //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(U const & s); + GLM_FUNC_DECL explicit tvec1(U const & s); ////////////////////////////////////// // Convertion vector constructors //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(tvec2 const & v); + GLM_FUNC_DECL explicit tvec1(tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(tvec3 const & v); + GLM_FUNC_DECL explicit tvec1(tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec1(tvec4 const & v); + GLM_FUNC_DECL explicit tvec1(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec1 & operator= (tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); - tvec1 & operator+=(value_type const & s); - tvec1 & operator+=(tvec1 const & v); - tvec1 & operator-=(value_type const & s); - tvec1 & operator-=(tvec1 const & v); - tvec1 & operator*=(value_type const & s); - tvec1 & operator*=(tvec1 const & v); - tvec1 & operator/=(value_type const & s); - tvec1 & operator/=(tvec1 const & v); - tvec1 & operator++(); - tvec1 & operator--(); + GLM_FUNC_DECL tvec1 & operator+=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator+=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator-=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator-=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator*=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator*=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator/=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator/=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator++(); + GLM_FUNC_DECL tvec1 & operator--(); ////////////////////////////////////// // Unary bit operators - tvec1 & operator%=(value_type const & s); - tvec1 & operator%=(tvec1 const & v); - tvec1 & operator&=(value_type const & s); - tvec1 & operator&=(tvec1 const & v); - tvec1 & operator|=(value_type const & s); - tvec1 & operator|=(tvec1 const & v); - tvec1 & operator^=(value_type const & s); - tvec1 & operator^=(tvec1 const & v); - tvec1 & operator<<=(value_type const & s); - tvec1 & operator<<=(tvec1 const & v); - tvec1 & operator>>=(value_type const & s); - tvec1 & operator>>=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator%=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator%=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator&=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator&=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator|=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator|=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator^=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator^=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator<<=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator<<=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator>>=(value_type const & s); + GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref1 swizzle(comp X); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref1 swizzle(comp X); }; template struct tref1 { - tref1(T & x); - tref1(tref1 const & r); - tref1(tvec1 const & v); + GLM_FUNC_DECL tref1(T & x); + GLM_FUNC_DECL tref1(tref1 const & r); + GLM_FUNC_DECL tref1(tvec1 const & v); - tref1 & operator= (tref1 const & r); - tref1 & operator= (tvec1 const & v); + GLM_FUNC_DECL tref1 & operator= (tref1 const & r); + GLM_FUNC_DECL tref1 & operator= (tvec1 const & v); T& x; }; diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 3e212c88..47e384de 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -41,7 +41,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec2 type; typedef tvec2 bool_type; @@ -66,23 +66,23 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec2(); - tvec2(tvec2 const & v); + GLM_FUNC_DECL tvec2(); + GLM_FUNC_DECL tvec2(tvec2 const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( ctor); - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( value_type const & s); - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( value_type const & s1, value_type const & s2); @@ -96,11 +96,11 @@ namespace glm //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( U const & x); //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2( + GLM_FUNC_DECL explicit tvec2( U const & x, V const & y); @@ -109,87 +109,87 @@ namespace glm //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2(tvec2 const & v); + GLM_FUNC_DECL explicit tvec2(tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2(tvec3 const & v); + GLM_FUNC_DECL explicit tvec2(tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec2(tvec4 const & v); + GLM_FUNC_DECL explicit tvec2(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); template - tvec2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); template - tvec2 & operator+=(U const & s); + GLM_FUNC_DECL tvec2 & operator+=(U const & s); template - tvec2 & operator+=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator+=(tvec2 const & v); template - tvec2 & operator-=(U const & s); + GLM_FUNC_DECL tvec2 & operator-=(U const & s); template - tvec2 & operator-=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator-=(tvec2 const & v); template - tvec2 & operator*=(U const & s); + GLM_FUNC_DECL tvec2 & operator*=(U const & s); template - tvec2 & operator*=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator*=(tvec2 const & v); template - tvec2 & operator/=(U const & s); + GLM_FUNC_DECL tvec2 & operator/=(U const & s); template - tvec2 & operator/=(tvec2 const & v); - tvec2 & operator++(); - tvec2 & operator--(); + GLM_FUNC_DECL tvec2 & operator/=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator++(); + GLM_FUNC_DECL tvec2 & operator--(); ////////////////////////////////////// // Unary bit operators template - tvec2 & operator%= (U const & s); + GLM_FUNC_DECL tvec2 & operator%= (U const & s); template - tvec2 & operator%= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator%= (tvec2 const & v); template - tvec2 & operator&= (U const & s); + GLM_FUNC_DECL tvec2 & operator&= (U const & s); template - tvec2 & operator&= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator&= (tvec2 const & v); template - tvec2 & operator|= (U const & s); + GLM_FUNC_DECL tvec2 & operator|= (U const & s); template - tvec2 & operator|= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator|= (tvec2 const & v); template - tvec2 & operator^= (U const & s); + GLM_FUNC_DECL tvec2 & operator^= (U const & s); template - tvec2 & operator^= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator^= (tvec2 const & v); template - tvec2 & operator<<=(U const & s); + GLM_FUNC_DECL tvec2 & operator<<=(U const & s); template - tvec2 & operator<<=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator<<=(tvec2 const & v); template - tvec2 & operator>>=(U const & s); + GLM_FUNC_DECL tvec2 & operator>>=(U const & s); template - tvec2 & operator>>=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref2 swizzle(comp X, comp Y); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); }; template struct tref2 { - tref2(T & x, T & y); - tref2(tref2 const & r); - tref2(tvec2 const & v); + GLM_FUNC_DECL tref2(T & x, T & y); + GLM_FUNC_DECL tref2(tref2 const & r); + GLM_FUNC_DECL tref2(tvec2 const & v); - tref2 & operator= (tref2 const & r); - tref2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tref2 & operator= (tref2 const & r); + GLM_FUNC_DECL tref2 & operator= (tvec2 const & v); T& x; T& y; diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 189950ab..7ea1cbfa 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -40,7 +40,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec3 type; typedef tvec3 bool_type; @@ -66,23 +66,23 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec3(); - tvec3(tvec3 const & v); + GLM_FUNC_DECL tvec3(); + GLM_FUNC_DECL tvec3(tvec3 const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( ctor); - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( value_type const & s); - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( value_type const & s1, value_type const & s2, value_type const & s3); @@ -90,18 +90,18 @@ namespace glm ////////////////////////////////////// // Swizzle constructors - tvec3(tref3 const & r); + GLM_FUNC_DECL tvec3(tref3 const & r); ////////////////////////////////////// // Convertion scalar constructors //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( U const & x); //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3( + GLM_FUNC_DECL explicit tvec3( U const & x, V const & y, W const & z); @@ -111,90 +111,90 @@ namespace glm //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(tvec2 const & v, B const & s); + GLM_FUNC_DECL explicit tvec3(tvec2 const & v, B const & s); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(A const & s, tvec2 const & v); + GLM_FUNC_DECL explicit tvec3(A const & s, tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(tvec3 const & v); + GLM_FUNC_DECL explicit tvec3(tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec3(tvec4 const & v); + GLM_FUNC_DECL explicit tvec3(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); template - tvec3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); template - tvec3 & operator+=(U const & s); + GLM_FUNC_DECL tvec3 & operator+=(U const & s); template - tvec3 & operator+=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator+=(tvec3 const & v); template - tvec3 & operator-=(U const & s); + GLM_FUNC_DECL tvec3 & operator-=(U const & s); template - tvec3 & operator-=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator-=(tvec3 const & v); template - tvec3 & operator*=(U const & s); + GLM_FUNC_DECL tvec3 & operator*=(U const & s); template - tvec3 & operator*=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator*=(tvec3 const & v); template - tvec3 & operator/=(U const & s); + GLM_FUNC_DECL tvec3 & operator/=(U const & s); template - tvec3 & operator/=(tvec3 const & v); - tvec3 & operator++(); - tvec3 & operator--(); + GLM_FUNC_DECL tvec3 & operator/=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator++(); + GLM_FUNC_DECL tvec3 & operator--(); ////////////////////////////////////// // Unary bit operators template - tvec3 & operator%= (U const & s); + GLM_FUNC_DECL tvec3 & operator%= (U const & s); template - tvec3 & operator%= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator%= (tvec3 const & v); template - tvec3 & operator&= (U const & s); + GLM_FUNC_DECL tvec3 & operator&= (U const & s); template - tvec3 & operator&= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator&= (tvec3 const & v); template - tvec3 & operator|= (U const & s); + GLM_FUNC_DECL tvec3 & operator|= (U const & s); template - tvec3 & operator|= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator|= (tvec3 const & v); template - tvec3 & operator^= (U const & s); + GLM_FUNC_DECL tvec3 & operator^= (U const & s); template - tvec3 & operator^= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator^= (tvec3 const & v); template - tvec3 & operator<<=(U const & s); + GLM_FUNC_DECL tvec3 & operator<<=(U const & s); template - tvec3 & operator<<=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator<<=(tvec3 const & v); template - tvec3 & operator>>=(U const & s); + GLM_FUNC_DECL tvec3 & operator>>=(U const & s); template - tvec3 & operator>>=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref3 swizzle(comp X, comp Y, comp Z); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); }; template struct tref3 { - tref3(T & x, T & y, T & z); - tref3(tref3 const & r); - tref3(tvec3 const & v); + GLM_FUNC_DECL tref3(T & x, T & y, T & z); + GLM_FUNC_DECL tref3(tref3 const & r); + GLM_FUNC_DECL tref3(tvec3 const & v); - tref3 & operator= (tref3 const & r); - tref3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tref3 & operator= (tref3 const & r); + GLM_FUNC_DECL tref3 & operator= (tvec3 const & v); T & x; T & y; diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 7257ceb0..25135de4 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -40,7 +40,7 @@ namespace glm typedef T value_type; typedef std::size_t size_type; - static size_type value_size(); + static GLM_FUNC_DECL size_type value_size(); typedef tvec4 type; typedef tvec4 bool_type; @@ -67,23 +67,23 @@ namespace glm ////////////////////////////////////// // Accesses - value_type & operator[](size_type i); - value_type const & operator[](size_type i) const; + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors - tvec4(); - tvec4(type const & v); + GLM_FUNC_DECL tvec4(); + GLM_FUNC_DECL tvec4(type const & v); ////////////////////////////////////// // Explicit basic constructors - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( ctor); - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( value_type const & s); - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( value_type const & s0, value_type const & s1, value_type const & s2, @@ -92,18 +92,18 @@ namespace glm ////////////////////////////////////// // Swizzle constructors - tvec4(tref4 const & r); + GLM_FUNC_DECL tvec4(tref4 const & r); ////////////////////////////////////// // Convertion scalar constructors //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( U const & x); //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4( + GLM_FUNC_DECL explicit tvec4( A const & x, B const & y, C const & z, @@ -114,99 +114,99 @@ namespace glm //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + GLM_FUNC_DECL explicit tvec4(tvec2 const & v, B const & s1, C const & s2); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2 const & v, C const & s2); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec3 const & v, B const & s); + GLM_FUNC_DECL explicit tvec4(tvec3 const & v, B const & s); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(A const & s, tvec3 const & v); + GLM_FUNC_DECL explicit tvec4(A const & s, tvec3 const & v); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec2 const & v1, tvec2 const & v2); + GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tvec2 const & v2); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - explicit tvec4(tvec4 const & v); + GLM_FUNC_DECL explicit tvec4(tvec4 const & v); ////////////////////////////////////// // Unary arithmetic operators - tvec4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); template - tvec4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); template - tvec4 & operator+=(U const & s); + GLM_FUNC_DECL tvec4 & operator+=(U const & s); template - tvec4 & operator+=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator+=(tvec4 const & v); template - tvec4 & operator-=(U const & s); + GLM_FUNC_DECL tvec4 & operator-=(U const & s); template - tvec4 & operator-=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator-=(tvec4 const & v); template - tvec4 & operator*=(U const & s); + GLM_FUNC_DECL tvec4 & operator*=(U const & s); template - tvec4 & operator*=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator*=(tvec4 const & v); template - tvec4 & operator/=(U const & s); + GLM_FUNC_DECL tvec4 & operator/=(U const & s); template - tvec4 & operator/=(tvec4 const & v); - tvec4 & operator++(); - tvec4 & operator--(); + GLM_FUNC_DECL tvec4 & operator/=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator++(); + GLM_FUNC_DECL tvec4 & operator--(); ////////////////////////////////////// // Unary bit operators template - tvec4 & operator%= (U const & s); + GLM_FUNC_DECL tvec4 & operator%= (U const & s); template - tvec4 & operator%= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator%= (tvec4 const & v); template - tvec4 & operator&= (U const & s); + GLM_FUNC_DECL tvec4 & operator&= (U const & s); template - tvec4 & operator&= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator&= (tvec4 const & v); template - tvec4 & operator|= (U const & s); + GLM_FUNC_DECL tvec4 & operator|= (U const & s); template - tvec4 & operator|= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator|= (tvec4 const & v); template - tvec4 & operator^= (U const & s); + GLM_FUNC_DECL tvec4 & operator^= (U const & s); template - tvec4 & operator^= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator^= (tvec4 const & v); template - tvec4 & operator<<=(U const & s); + GLM_FUNC_DECL tvec4 & operator<<=(U const & s); template - tvec4 & operator<<=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator<<=(tvec4 const & v); template - tvec4 & operator>>=(U const & s); + GLM_FUNC_DECL tvec4 & operator>>=(U const & s); template - tvec4 & operator>>=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); ////////////////////////////////////// // Swizzle operators - value_type swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref4 swizzle(comp X, comp Y, comp Z, comp W); + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); }; template struct tref4 { - tref4(T & x, T & y, T & z, T & w); - tref4(tref4 const & r); - tref4(tvec4 const & v); + GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w); + GLM_FUNC_DECL tref4(tref4 const & r); + GLM_FUNC_DECL tref4(tvec4 const & v); - tref4 & operator= (tref4 const & r); - tref4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tref4 & operator= (tref4 const & r); + GLM_FUNC_DECL tref4 & operator= (tvec4 const & v); T & x; T & y;