- Main Page
- Related Pages
- Modules
- Files

- File List

color_cast.hpp
Go to the documentation of this file.
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 #ifndef GLM_GTX_color_cast
40 #define GLM_GTX_color_cast GLM_VERSION
41
42 // Dependency:
43 #include "../glm.hpp"
44 #include "../gtx/number_precision.hpp"
45
46 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
47 # pragma message("GLM: GLM_GTX_color_cast extension included")
48 #endif
49
50 namespace glm
51 {
54
57 template <typename valType> uint8 u8channel_cast(valType a);
58
61 template <typename valType> uint16 u16channel_cast(valType a);
62
63 template <typename T> uint32 u32_rgbx_cast(const detail::tvec3<T>& c);
64 template <typename T> uint32 u32_xrgb_cast(const detail::tvec3<T>& c);
65 template <typename T> uint32 u32_bgrx_cast(const detail::tvec3<T>& c);
66 template <typename T> uint32 u32_xbgr_cast(const detail::tvec3<T>& c);
67
68 template <typename T> uint32 u32_rgba_cast(const detail::tvec4<T>& c);
69 template <typename T> uint32 u32_argb_cast(const detail::tvec4<T>& c);
70 template <typename T> uint32 u32_bgra_cast(const detail::tvec4<T>& c);
71 template <typename T> uint32 u32_abgr_cast(const detail::tvec4<T>& c);
72
73 template <typename T> uint64 u64_rgbx_cast(const detail::tvec3<T>& c);
74 template <typename T> uint64 u64_xrgb_cast(const detail::tvec3<T>& c);
75 template <typename T> uint64 u64_bgrx_cast(const detail::tvec3<T>& c);
76 template <typename T> uint64 u64_xbgr_cast(const detail::tvec3<T>& c);
77
78 template <typename T> uint64 u64_rgba_cast(const detail::tvec4<T>& c);
79 template <typename T> uint64 u64_argb_cast(const detail::tvec4<T>& c);
80 template <typename T> uint64 u64_bgra_cast(const detail::tvec4<T>& c);
81 template <typename T> uint64 u64_abgr_cast(const detail::tvec4<T>& c);
82
83 template <typename T> f16 f16_channel_cast(T a);
84
85 template <typename T> f16vec3 f16_rgbx_cast(T c);
86 template <typename T> f16vec3 f16_xrgb_cast(T c);
87 template <typename T> f16vec3 f16_bgrx_cast(T c);
88 template <typename T> f16vec3 f16_xbgr_cast(T c);
89
90 template <typename T> f16vec4 f16_rgba_cast(T c);
91 template <typename T> f16vec4 f16_argb_cast(T c);
92 template <typename T> f16vec4 f16_bgra_cast(T c);
93 template <typename T> f16vec4 f16_abgr_cast(T c);
94
95 template <typename T> f32 f32_channel_cast(T a);
96
97 template <typename T> f32vec3 f32_rgbx_cast(T c);
98 template <typename T> f32vec3 f32_xrgb_cast(T c);
99 template <typename T> f32vec3 f32_bgrx_cast(T c);
100 template <typename T> f32vec3 f32_xbgr_cast(T c);
101
102 template <typename T> f32vec4 f32_rgba_cast(T c);
103 template <typename T> f32vec4 f32_argb_cast(T c);
104 template <typename T> f32vec4 f32_bgra_cast(T c);
105 template <typename T> f32vec4 f32_abgr_cast(T c);
106
107 template <typename T> f64 f64_channel_cast(T a);
108
109 template <typename T> f64vec3 f64_rgbx_cast(T c);
110 template <typename T> f64vec3 f64_xrgb_cast(T c);
111 template <typename T> f64vec3 f64_bgrx_cast(T c);
112 template <typename T> f64vec3 f64_xbgr_cast(T c);
113
114 template <typename T> f64vec4 f64_rgba_cast(T c);
115 template <typename T> f64vec4 f64_argb_cast(T c);
116 template <typename T> f64vec4 f64_bgra_cast(T c);
117 template <typename T> f64vec4 f64_abgr_cast(T c);
118
120 }//namespace glm
121
122 #include "color_cast.inl"
123
124 #endif//GLM_GTX_color_cast