Moved color_encoding to experimental

This commit is contained in:
Christophe Riccio
2016-11-20 21:50:12 +01:00
parent e6ee4bc90d
commit d4019aab40
8 changed files with 20 additions and 56 deletions

View File

@@ -35,7 +35,6 @@
#endif//GLM_MESSAGES
#include "./gtc/bitfield.hpp"
#include "./gtc/color_encoding.hpp"
#include "./gtc/color_space.hpp"
#include "./gtc/constants.hpp"
#include "./gtc/epsilon.hpp"
@@ -64,6 +63,7 @@
#include "./gtx/associated_min_max.hpp"
#include "./gtx/bit.hpp"
#include "./gtx/closest_point.hpp"
#include "./gtx/color_encoding.hpp"
#include "./gtx/color_space.hpp"
#include "./gtx/color_space_YCoCg.hpp"
#include "./gtx/compatibility.hpp"

View File

@@ -1,11 +1,11 @@
/// @ref gtc_color_encoding
/// @file glm/gtc/color_encoding.hpp
/// @ref gtx_color_encoding
/// @file glm/gtx/color_encoding.hpp
///
/// @see core (dependence)
/// @see gtc_color_encoding (dependence)
/// @see gtx_color_encoding (dependence)
///
/// @defgroup gtc_color_encoding GLM_GTC_color_encoding
/// @ingroup gtc
/// @defgroup gtx_color_encoding GLM_GTX_color_encoding
/// @ingroup gtx
///
/// @brief Allow to perform bit operations on integer values
///
@@ -25,21 +25,21 @@
namespace glm
{
/// @addtogroup gtc_color_encoding
/// @addtogroup gtx_color_encoding
/// @{
/// Convert a linear sRGB color to D65 YUV.
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> convertLinearSRGBToD65XYZ(tvec3<T, P> const& ColorLinearSRGB);
/// Convert a linear sRGB color to D50 YUV.
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> convertLinearSRGBToD50XYZ(tvec3<T, P> const& ColorLinearSRGB);
/// Convert a D65 YUV color to linear sRGB.
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> convertD65XYZToLinearSRGB(tvec3<T, P> const& ColorD65XYZ);
/// Convert a D50 YUV color to D65 YUV.
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> convertD50XYZToD65XYZ(tvec3<T, P> const& ColorD50XYZ);
/// Convert a D65 YUV color to D50 YUV.
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> convertD65XYZToD50XYZ(tvec3<T, P> const& ColorD65XYZ);

View File

@@ -1,5 +1,5 @@
/// @ref gtc_color_encoding
/// @file glm/gtc/color_encoding.inl
/// @ref gtx_color_encoding
/// @file glm/gtx/color_encoding.inl
namespace glm
{
@@ -13,16 +13,6 @@ namespace glm
return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast<T>(5.650675255693055f);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> convertD65XYZToLinearSRGB(tvec3<T, P> const& ColorD65XYZ)
{
tvec3<T, P> const M(0.41847f, -0.091169f, 0.0009209f);
tvec3<T, P> const N(-0.15866f, 0.25243f, 0.015708f);
tvec3<T, P> const O(0.0009209f, -0.0025498f, 0.1786f);
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> convertLinearSRGBToD50XYZ(tvec3<T, P> const& ColorLinearSRGB)
{
@@ -34,13 +24,13 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> convertD50XYZToLinearSRGB(tvec3<T, P> const& ColorD50XYZ)
GLM_FUNC_QUALIFIER tvec3<T, P> convertD65XYZToLinearSRGB(tvec3<T, P> const& ColorD65XYZ)
{
tvec3<T, P> const M();
tvec3<T, P> const N();
tvec3<T, P> const O();
tvec3<T, P> const M(0.41847f, -0.091169f, 0.0009209f);
tvec3<T, P> const N(-0.15866f, 0.25243f, 0.015708f);
tvec3<T, P> const O(0.0009209f, -0.0025498f, 0.1786f);
return M * ColorD50XYZ + N * ColorD50XYZ + O * ColorD50XYZ;
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
}
template <typename T, precision P>
@@ -53,13 +43,4 @@ namespace glm
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> convertD50XYZToD65XYZ(tvec3<T, P> const& ColorD50XYZ)
{
tvec3<T, P> const M();
tvec3<T, P> const N();
tvec3<T, P> const O();
return M * ColorD50XYZ + N * ColorD50XYZ + O * ColorD50XYZ;
}
}//namespace glm