|
|
|
@ -24,15 +24,15 @@ |
|
|
|
|
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
/// THE SOFTWARE.
|
|
|
|
|
///
|
|
|
|
|
/// @ref gtc_color
|
|
|
|
|
/// @file glm/gtc/color.hpp
|
|
|
|
|
/// @date 2015-02-10 / 2015-02-10
|
|
|
|
|
/// @ref gtc_color_space
|
|
|
|
|
/// @file glm/gtc/color_space.hpp
|
|
|
|
|
/// @date 2015-02-10 / 2015-08-02
|
|
|
|
|
/// @author Christophe Riccio
|
|
|
|
|
///
|
|
|
|
|
/// @see core (dependence)
|
|
|
|
|
/// @see gtc_color (dependence)
|
|
|
|
|
/// @see gtc_color_space (dependence)
|
|
|
|
|
///
|
|
|
|
|
/// @defgroup gtc_color GLM_GTC_color
|
|
|
|
|
/// @defgroup gtc_color_space GLM_GTC_color_space
|
|
|
|
|
/// @ingroup gtc
|
|
|
|
|
///
|
|
|
|
|
/// @brief Allow to perform bit operations on integer values
|
|
|
|
@ -51,31 +51,31 @@ |
|
|
|
|
#include <limits> |
|
|
|
|
|
|
|
|
|
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) |
|
|
|
|
# pragma message("GLM: GLM_GTC_color extension included") |
|
|
|
|
# pragma message("GLM: GLM_GTC_color_space extension included") |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
namespace glm |
|
|
|
|
{ |
|
|
|
|
/// @addtogroup gtc_color
|
|
|
|
|
/// @addtogroup gtc_color_space
|
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
|
|
/// Convert a RGB color to sRGB color using a standard gamma correction
|
|
|
|
|
/// Convert a linear color to sRGB color using a standard gamma correction
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertRgbToSrgb(vecType<T, P> const & ColorRGB); |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertLinearToSRGB(vecType<T, P> const & ColorLinear); |
|
|
|
|
|
|
|
|
|
/// Convert a RGB color to sRGB color using a custom gamma correction
|
|
|
|
|
/// Convert a linear color to sRGB color using a custom gamma correction
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertRgbToSrgb(vecType<T, P> const & ColorRGB, T Gamma); |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertLinearToSRGB(vecType<T, P> const & ColorLinear, T Gamma); |
|
|
|
|
|
|
|
|
|
/// Convert a sRGB color to RGB color using a standard gamma correction
|
|
|
|
|
/// Convert a sRGB color to linear color using a standard gamma correction
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertSrgbToRgb(vecType<T, P> const & ColorSRGB); |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertSRGBToLinear(vecType<T, P> const & ColorSRGB); |
|
|
|
|
|
|
|
|
|
/// Convert a sRGB color to RGB color using a custom gamma correction
|
|
|
|
|
/// Convert a sRGB color to linear color using a custom gamma correction
|
|
|
|
|
template <typename T, precision P, template <typename, precision> class vecType> |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertSrgbToRgb(vecType<T, P> const & ColorSRGB, T Gamma); |
|
|
|
|
GLM_FUNC_DECL vecType<T, P> convertSRGBToLinear(vecType<T, P> const & ColorSRGB, T Gamma); |
|
|
|
|
|
|
|
|
|
/// @}
|
|
|
|
|
} //namespace glm
|
|
|
|
|
|
|
|
|
|
#include "color.inl" |
|
|
|
|
#include "color_space.inl" |