diff --git a/glm/gtc/color.hpp b/glm/gtc/color.hpp index c560d256..e685cf4f 100644 --- a/glm/gtc/color.hpp +++ b/glm/gtc/color.hpp @@ -61,19 +61,19 @@ namespace glm /// Convert a RGB color to sRGB color using a standard gamma correction template class vecType> - GLM_FUNC_DECL vecType rgbToSrgb(vecType const & ColorRGB); + GLM_FUNC_DECL vecType convertRgbToSrgb(vecType const & ColorRGB); /// Convert a RGB color to sRGB color using a custom gamma correction template class vecType> - GLM_FUNC_DECL vecType rgbToSrgb(vecType const & ColorRGB, T Gamma); + GLM_FUNC_DECL vecType convertRgbToSrgb(vecType const & ColorRGB, T Gamma); /// Convert a sRGB color to RGB color using a standard gamma correction template class vecType> - GLM_FUNC_DECL vecType srgbToRgb(vecType const & ColorSRGB); + GLM_FUNC_DECL vecType convertSrgbToRgb(vecType const & ColorSRGB); /// Convert a sRGB color to RGB color using a custom gamma correction template class vecType> - GLM_FUNC_DECL vecType srgbToRgb(vecType const & ColorSRGB, T Gamma); + GLM_FUNC_DECL vecType convertSrgbToRgb(vecType const & ColorSRGB, T Gamma); /// @} } //namespace glm diff --git a/glm/gtc/color.inl b/glm/gtc/color.inl index 11cb931d..8d127fa1 100644 --- a/glm/gtc/color.inl +++ b/glm/gtc/color.inl @@ -79,25 +79,25 @@ namespace detail }//namespace detail template class vecType> - GLM_FUNC_QUALIFIER vecType rgbToSrgb(vecType const & ColorRGB) + GLM_FUNC_QUALIFIER vecType convertRgbToSrgb(vecType const & ColorRGB) { return detail::compute_rgbToSrgb::call(ColorRGB, static_cast(0.41666)); } template class vecType> - GLM_FUNC_QUALIFIER vecType rgbToSrgb(vecType const & ColorRGB, T Gamma) + GLM_FUNC_QUALIFIER vecType convertRgbToSrgb(vecType const & ColorRGB, T Gamma) { return detail::compute_rgbToSrgb::call(ColorRGB, static_cast(1) / Gamma); } template class vecType> - GLM_FUNC_QUALIFIER vecType srgbToRgb(vecType const & ColorSRGB) + GLM_FUNC_QUALIFIER vecType convertSrgbToRgb(vecType const & ColorSRGB) { return detail::compute_srgbToRgb::call(ColorSRGB, static_cast(2.4)); } template class vecType> - GLM_FUNC_QUALIFIER vecType srgbToRgb(vecType const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER vecType convertSrgbToRgb(vecType const & ColorSRGB, T Gamma) { return detail::compute_srgbToRgb::call(ColorSRGB, Gamma); } diff --git a/test/gtc/gtc_color.cpp b/test/gtc/gtc_color.cpp index 5b191a0c..77759dac 100644 --- a/test/gtc/gtc_color.cpp +++ b/test/gtc/gtc_color.cpp @@ -42,14 +42,14 @@ namespace srgb glm::vec4 const ColorSourceRGB(1.0, 0.5, 0.0, 1.0); { - glm::vec4 const ColorSRGB = glm::rgbToSrgb(ColorSourceRGB); - glm::vec4 const ColorRGB = glm::srgbToRgb(ColorSRGB); + glm::vec4 const ColorSRGB = glm::convertRgbToSrgb(ColorSourceRGB); + glm::vec4 const ColorRGB = glm::convertSrgbToRgb(ColorSRGB); Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1; } { - glm::vec4 const ColorSRGB = glm::rgbToSrgb(ColorSourceRGB, 2.8f); - glm::vec4 const ColorRGB = glm::srgbToRgb(ColorSRGB, 2.8f); + glm::vec4 const ColorSRGB = glm::convertRgbToSrgb(ColorSourceRGB, 2.8f); + glm::vec4 const ColorRGB = glm::convertSrgbToRgb(ColorSRGB, 2.8f); Error += glm::all(glm::epsilonEqual(ColorSourceRGB, ColorRGB, 0.00001f)) ? 0 : 1; }