blob: 428ca6d29362fa97e9ba9f7e419120727f2d75f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/// @ref gtx_color_space_YCoCg
/// @file glm/gtx/color_space_YCoCg.hpp
///
/// @see core (dependence)
///
/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg
/// @ingroup gtx
///
/// @brief RGB to YCoCg conversions and operations
///
/// <glm/gtx/color_space_YCoCg.hpp> need to be included to use these functionalities.
#pragma once
// Dependency:
#include "../glm.hpp"
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
#endif
namespace glm
{
/// @addtogroup gtx_color_space_YCoCg
/// @{
/// Convert a color from RGB color space to YCoCg color space.
/// @see gtx_color_space_YCoCg
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rgb2YCoCg(
tvec3<T, P> const & rgbColor);
/// Convert a color from YCoCg color space to RGB color space.
/// @see gtx_color_space_YCoCg
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> YCoCg2rgb(
tvec3<T, P> const & YCoCgColor);
/// Convert a color from RGB color space to YCoCgR color space.
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
/// @see gtx_color_space_YCoCg
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> rgb2YCoCgR(
tvec3<T, P> const & rgbColor);
/// Convert a color from YCoCgR color space to RGB color space.
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
/// @see gtx_color_space_YCoCg
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> YCoCgR2rgb(
tvec3<T, P> const & YCoCgColor);
/// @}
}//namespace glm
#include "color_space_YCoCg.inl"
|