Renamed GTC_color to GTC_color_space

This commit is contained in:
Christophe Riccio
2015-08-01 21:55:28 +02:00
parent d6ae2fd694
commit 5437d49cf2
5 changed files with 38 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
glmCreateTestGTC(gtc_bitfield)
glmCreateTestGTC(gtc_color)
glmCreateTestGTC(gtc_color_space)
glmCreateTestGTC(gtc_constants)
glmCreateTestGTC(gtc_epsilon)
glmCreateTestGTC(gtc_integer)

View File

@@ -29,7 +29,7 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#include <glm/gtc/color.hpp>
#include <glm/gtc/color_space.hpp>
#include <glm/gtc/epsilon.hpp>
#include <glm/gtc/constants.hpp>
@@ -42,28 +42,28 @@ namespace srgb
glm::vec3 const ColorSourceRGB(1.0, 0.5, 0.0);
{
glm::vec3 const ColorSRGB = glm::convertRgbToSrgb(ColorSourceRGB);
glm::vec3 const ColorRGB = glm::convertSrgbToRgb(ColorSRGB);
glm::vec3 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGB);
glm::vec3 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB);
Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1;
}
{
glm::vec3 const ColorSRGB = glm::convertRgbToSrgb(ColorSourceRGB, 2.8f);
glm::vec3 const ColorRGB = glm::convertSrgbToRgb(ColorSRGB, 2.8f);
glm::vec3 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGB, 2.8f);
glm::vec3 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB, 2.8f);
Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1;
}
glm::vec4 const ColorSourceRGBA(1.0, 0.5, 0.0, 1.0);
{
glm::vec4 const ColorSRGB = glm::convertRgbToSrgb(ColorSourceRGBA);
glm::vec4 const ColorRGB = glm::convertSrgbToRgb(ColorSRGB);
glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGBA);
glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB);
Error += glm::all(glm::epsilonEqual(ColorSourceRGBA, ColorRGB, 0.00001f)) ? 0 : 1;
}
{
glm::vec4 const ColorSRGB = glm::convertRgbToSrgb(ColorSourceRGBA, 2.8f);
glm::vec4 const ColorRGB = glm::convertSrgbToRgb(ColorSRGB, 2.8f);
glm::vec4 const ColorSRGB = glm::convertLinearToSRGB(ColorSourceRGBA, 2.8f);
glm::vec4 const ColorRGB = glm::convertSRGBToLinear(ColorSRGB, 2.8f);
Error += glm::all(glm::epsilonEqual(ColorSourceRGBA, ColorRGB, 0.00001f)) ? 0 : 1;
}