From 0e31538c2690d4ef79cf2903bda420e4745b0aca Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 11 Oct 2013 01:10:15 +0200 Subject: [PATCH] Deprecated some GTX functions --- glm/gtx/color_cast.hpp | 121 ++++++++++++++++++++--------------- glm/gtx/extend.hpp | 2 +- glm/gtx/extend.inl | 8 +-- glm/gtx/transform2.hpp | 28 ++++---- glm/gtx/verbose_operator.hpp | 10 +-- 5 files changed, 94 insertions(+), 75 deletions(-) diff --git a/glm/gtx/color_cast.hpp b/glm/gtx/color_cast.hpp index b0aed707..e3beca7b 100644 --- a/glm/gtx/color_cast.hpp +++ b/glm/gtx/color_cast.hpp @@ -54,67 +54,86 @@ namespace glm //! Conversion of a floating value into a 8bit unsigned int value. /// @see gtx_color_cast - template uint8 u8channel_cast(valType a); + template + GLM_DEPRECATED uint8 u8channel_cast(valType a); - /// Conversion of a floating value into a 16bit unsigned int value. - /// @see gtx_color_cast - template uint16 u16channel_cast(valType a); + template + GLM_DEPRECATED uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - template f16 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - template f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - - template f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - - template f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template + GLM_DEPRECATED f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) /// @} }//namespace glm diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index d23bebad..8b3afe14 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -53,7 +53,7 @@ namespace glm /// Extends of Length the Origin position using the (Source - Origin) direction. /// @see gtx_extend template - genType extend( + GLM_FUNC_DECL genType extend( genType const & Origin, genType const & Source, typename genType::value_type const Length); diff --git a/glm/gtx/extend.inl b/glm/gtx/extend.inl index 9827401e..e159987c 100644 --- a/glm/gtx/extend.inl +++ b/glm/gtx/extend.inl @@ -10,7 +10,7 @@ namespace glm { template - genType extend + GLM_FUNC_QUALIFIER genType extend ( genType const & Origin, genType const & Source, @@ -21,7 +21,7 @@ namespace glm } template - detail::tvec2 extend + GLM_FUNC_QUALIFIER detail::tvec2 extend ( detail::tvec2 const & Origin, detail::tvec2 const & Source, @@ -32,7 +32,7 @@ namespace glm } template - detail::tvec3 extend + GLM_FUNC_QUALIFIER detail::tvec3 extend ( detail::tvec3 const & Origin, detail::tvec3 const & Source, @@ -43,7 +43,7 @@ namespace glm } template - detail::tvec4 extend + GLM_FUNC_QUALIFIER detail::tvec4 extend ( detail::tvec4 const & Origin, detail::tvec4 const & Source, diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index a83a9329..9de35f4f 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -61,30 +61,30 @@ namespace glm //! Transforms a matrix with a shearing on Y axis. //! From GLM_GTX_transform2 extension. - template + template detail::tmat3x3 shearY2D( detail::tmat3x3 const & m, T x); //! Transforms a matrix with a shearing on X axis //! From GLM_GTX_transform2 extension. - template + template detail::tmat4x4 shearX3D( const detail::tmat4x4 & m, T y, T z); - + //! Transforms a matrix with a shearing on Y axis. //! From GLM_GTX_transform2 extension. - template + template detail::tmat4x4 shearY3D( const detail::tmat4x4 & m, T x, T z); - + //! Transforms a matrix with a shearing on Z axis. //! From GLM_GTX_transform2 extension. - template + template detail::tmat4x4 shearZ3D( const detail::tmat4x4 & m, T x, @@ -100,30 +100,30 @@ namespace glm //! Build planar projection matrix along normal axis. //! From GLM_GTX_transform2 extension. - template + template detail::tmat3x3 proj2D( const detail::tmat3x3 & m, const detail::tvec3& normal); - + //! Build planar projection matrix along normal axis. //! From GLM_GTX_transform2 extension. - template + template detail::tmat4x4 proj3D( const detail::tmat4x4 & m, const detail::tvec3& normal); //! Build a scale bias matrix. //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 scaleBias( + template + detail::tmat4x4 scaleBias( valType scale, valType bias); //! Build a scale bias matrix. //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 scaleBias( - detail::tmat4x4 const & m, + template + detail::tmat4x4 scaleBias( + detail::tmat4x4 const & m, valType scale, valType bias); diff --git a/glm/gtx/verbose_operator.hpp b/glm/gtx/verbose_operator.hpp index 3780f42a..9cf2dcb9 100644 --- a/glm/gtx/verbose_operator.hpp +++ b/glm/gtx/verbose_operator.hpp @@ -53,27 +53,27 @@ namespace glm //! Addition of two values /// @see gtx_verbose_operator extension. template - genTypeT add(genTypeT const & a, genTypeU const & b); + GLM_DEPRECATED genTypeT add(genTypeT const & a, genTypeU const & b); //! Substration of two values /// @see gtx_verbose_operator extension. template - genTypeT sub(genTypeT const & a, genTypeU const & b); + GLM_DEPRECATED genTypeT sub(genTypeT const & a, genTypeU const & b); //! Multiplication of two values /// @see gtx_verbose_operator extension. template - genTypeT mul(genTypeT const & a, genTypeU const & b); + GLM_DEPRECATED genTypeT mul(genTypeT const & a, genTypeU const & b); //! Division of two values /// @see gtx_verbose_operator extension. template - genTypeT div(genTypeT const & a, genTypeU const & b); + GLM_DEPRECATED genTypeT div(genTypeT const & a, genTypeU const & b); //! Multiplication and addition of three values /// @see gtx_verbose_operator extension. template - genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); + GLM_DEPRECATED genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); /// @} }// namespace glm