aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/glm/gtc/color_space.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/glm/gtc/color_space.hpp')
-rw-r--r--src/include/glm/gtc/color_space.hpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/include/glm/gtc/color_space.hpp b/src/include/glm/gtc/color_space.hpp
new file mode 100644
index 0000000..4c63077
--- /dev/null
+++ b/src/include/glm/gtc/color_space.hpp
@@ -0,0 +1,56 @@
+/// @ref gtc_color_space
+/// @file glm/gtc/color_space.hpp
+///
+/// @see core (dependence)
+/// @see gtc_color_space (dependence)
+///
+/// @defgroup gtc_color_space GLM_GTC_color_space
+/// @ingroup gtc
+///
+/// Include <glm/gtc/color_space.hpp> to use the features of this extension.
+///
+/// Allow to perform bit operations on integer values
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/qualifier.hpp"
+#include "../exponential.hpp"
+#include "../vec3.hpp"
+#include "../vec4.hpp"
+#include <limits>
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_GTC_color_space extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup gtc_color_space
+ /// @{
+
+ /// Convert a linear color to sRGB color using a standard gamma correction.
+ /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear);
+
+ /// Convert a linear color to sRGB color using a custom gamma correction.
+ /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear, T Gamma);
+
+ /// Convert a sRGB color to linear color using a standard gamma correction.
+ /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB);
+
+ /// Convert a sRGB color to linear color using a custom gamma correction.
+ // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB, T Gamma);
+
+ /// @}
+} //namespace glm
+
+#include "color_space.inl"