color_encoding.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. # ifndef GLM_ENABLE_EXPERIMENTAL
  21. # pragma message("GLM: GLM_GTC_color_encoding is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
  22. # else
  23. # pragma message("GLM: GLM_GTC_color_encoding extension included")
  24. # endif
  25. #endif
  26. namespace glm
  27. {
  28. /// @addtogroup gtx_color_encoding
  29. /// @{
  30. /// Convert a linear sRGB color to D65 YUV.
  31. template<typename T, qualifier Q>
  32. GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD65XYZ(vec<3, T, Q> const& ColorLinearSRGB);
  33. /// Convert a linear sRGB color to D50 YUV.
  34. template<typename T, qualifier Q>
  35. GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD50XYZ(vec<3, T, Q> const& ColorLinearSRGB);
  36. /// Convert a D65 YUV color to linear sRGB.
  37. template<typename T, qualifier Q>
  38. GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToLinearSRGB(vec<3, T, Q> const& ColorD65XYZ);
  39. /// Convert a D65 YUV color to D50 YUV.
  40. template<typename T, qualifier Q>
  41. GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToD50XYZ(vec<3, T, Q> const& ColorD65XYZ);
  42. /// @}
  43. } //namespace glm
  44. #include "color_encoding.inl"