color_encoding.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /// @ref gtx_color_encoding
  2. /// @file glm/gtx/color_encoding.hpp
  3. ///
  4. /// @see core (dependence)
  5. /// @see gtx_color_encoding (dependence)
  6. ///
  7. /// @defgroup gtx_color_encoding GLM_GTX_color_encoding
  8. /// @ingroup gtx
  9. ///
  10. /// Include <glm/gtx/color_encoding.hpp> to use the features of this extension.
  11. ///
  12. /// @brief Allow to perform bit operations on integer values
  13. #pragma once
  14. // Dependencies
  15. #include "../detail/setup.hpp"
  16. #include "../detail/qualifier.hpp"
  17. #include "../vec3.hpp"
  18. #include <limits>
  19. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  20. # pragma message("GLM: GLM_GTC_color_encoding extension included")
  21. #endif
  22. namespace glm
  23. {
  24. /// @addtogroup gtx_color_encoding
  25. /// @{
  26. /// Convert a linear sRGB color to D65 YUV.
  27. template<typename T, qualifier Q>
  28. GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD65XYZ(vec<3, T, Q> const& ColorLinearSRGB);
  29. /// Convert a linear sRGB color to D50 YUV.
  30. template<typename T, qualifier Q>
  31. GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD50XYZ(vec<3, T, Q> const& ColorLinearSRGB);
  32. /// Convert a D65 YUV color to linear sRGB.
  33. template<typename T, qualifier Q>
  34. GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToLinearSRGB(vec<3, T, Q> const& ColorD65XYZ);
  35. /// Convert a D65 YUV color to D50 YUV.
  36. template<typename T, qualifier Q>
  37. GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToD50XYZ(vec<3, T, Q> const& ColorD65XYZ);
  38. /// @}
  39. } //namespace glm
  40. #include "color_encoding.inl"