diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-20 04:35:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-20 04:35:41 +0400 |
commit | a2a99bbc17e467281af835d170588588a06e6ab0 (patch) | |
tree | 21ced1777f91d1cf5c2ec24817aeef0c1654d4a1 /source/gameengine/Ketsji | |
parent | e3c9fcd1bbcc2965c909b5c81bd133c851e5b1e7 (diff) |
edit to r58425, BLI_math is available here, better not copy,paste from linearrgb_to_srgb.
also remove redundant check in AUD_FFMPEGReader::seek.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_FontObject.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 63f715779f3..c6d1041a12a 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -178,19 +178,12 @@ void KX_FontObject::DrawText() /* Font Objects don't use the glsl shader, this color management code is copied from gpu_shader_material.glsl */ float color[4]; - for (int i = 0; i < 3; i++) { - if (m_do_color_management) { - float c = m_color[i]; - if(c < 0.0031308) - c = (c < 0.0) ? 0.0: c * 12.92; - else - c = 1.055 * pow(c, 1.0f/2.4f) - 0.055; - color[i] = c; - } - else - color[i] = m_color[i]; + if (m_do_color_management) { + linearrgb_to_srgb_v4(color, m_color); + } + else { + copy_v4_v4(color, m_color); } - color[3] = m_color[3]; /* HARDCODED MULTIPLICATION FACTOR - this will affect the render resolution directly */ const float RES = BGE_FONT_RES * m_resolution; |