Added GLM_FORCE_EXPLICIT_CTOR
This commit is contained in:
@@ -114,9 +114,6 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Conversion vector constructors
|
// Conversion vector constructors
|
||||||
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U, precision Q>
|
|
||||||
GLM_FUNC_DECL explicit tvec1(tvec1<U, Q> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
GLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v);
|
GLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v);
|
||||||
@@ -127,6 +124,16 @@ namespace glm
|
|||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
GLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v);
|
GLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v);
|
||||||
|
|
||||||
|
# ifdef GLM_FORCE_EXPLICIT_CTOR
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL explicit tvec1(tvec1<U, Q> const & v);
|
||||||
|
# else
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL tvec1(tvec1<U, Q> const & v);
|
||||||
|
# endif
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|
||||||
|
|||||||
@@ -126,9 +126,6 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Conversion vector constructors
|
// Conversion vector constructors
|
||||||
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U, precision Q>
|
|
||||||
GLM_FUNC_DECL explicit tvec2(tvec2<U, Q> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);
|
GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);
|
||||||
@@ -136,6 +133,16 @@ namespace glm
|
|||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
GLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);
|
GLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);
|
||||||
|
|
||||||
|
# ifdef GLM_FORCE_EXPLICIT_CTOR
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL explicit tvec2(tvec2<U, Q> const & v);
|
||||||
|
# else
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL tvec2(tvec2<U, Q> const & v);
|
||||||
|
# endif
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|
||||||
|
|||||||
@@ -141,11 +141,18 @@ namespace glm
|
|||||||
GLM_FUNC_DECL explicit tvec3(tvec1<A, Q> const & a, tvec2<B, Q> const & b);
|
GLM_FUNC_DECL explicit tvec3(tvec1<A, Q> const & a, tvec2<B, Q> const & b);
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
GLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v);
|
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U, precision Q>
|
|
||||||
GLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);
|
GLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);
|
||||||
|
|
||||||
|
# ifdef GLM_FORCE_EXPLICIT_CTOR
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v);
|
||||||
|
# else
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL tvec3(tvec3<U, Q> const & v);
|
||||||
|
# endif
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|
||||||
|
|||||||
@@ -188,9 +188,16 @@ namespace detail
|
|||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
template <typename A, typename B, precision Q>
|
template <typename A, typename B, precision Q>
|
||||||
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, tvec2<B, Q> const & b);
|
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, tvec2<B, Q> const & b);
|
||||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
|
||||||
template <typename U, precision Q>
|
# ifdef GLM_FORCE_EXPLICIT_CTOR
|
||||||
GLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v);
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v);
|
||||||
|
# else
|
||||||
|
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||||
|
template <typename U, precision Q>
|
||||||
|
GLM_FUNC_DECL tvec4(tvec4<U, Q> const & v);
|
||||||
|
# endif
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Swizzle constructors
|
// Swizzle constructors
|
||||||
|
|||||||
Reference in New Issue
Block a user