From 49aa7b1261a45e5e290c12ebc35ef15687971556 Mon Sep 17 00:00:00 2001 From: Quentin Wenger Date: Wed, 24 Jun 2015 12:52:54 +0200 Subject: [PATCH] BGE: Fix color used as background in VideoTexture. Now we use color converted (if we do a color management) by the setter for background color in VideoTexture (ImageRender & ImageMirror). Reviewers:panzergame --- source/gameengine/Ketsji/KX_WorldInfo.cpp | 4 ++-- source/gameengine/Ketsji/KX_WorldInfo.h | 2 +- source/gameengine/VideoTexture/ImageRender.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/gameengine/Ketsji/KX_WorldInfo.cpp b/source/gameengine/Ketsji/KX_WorldInfo.cpp index 8678b058761..111d81cad2e 100644 --- a/source/gameengine/Ketsji/KX_WorldInfo.cpp +++ b/source/gameengine/Ketsji/KX_WorldInfo.cpp @@ -100,9 +100,9 @@ void KX_WorldInfo::setBackColor(float r, float g, float b) } } -const float *KX_WorldInfo::getBackColor(void) const +const float *KX_WorldInfo::getBackColorConverted() const { - return m_backgroundcolor; + return m_con_backgroundcolor; } void KX_WorldInfo::setMistType(short type) diff --git a/source/gameengine/Ketsji/KX_WorldInfo.h b/source/gameengine/Ketsji/KX_WorldInfo.h index 0e8fe3c730a..22851d3e269 100644 --- a/source/gameengine/Ketsji/KX_WorldInfo.h +++ b/source/gameengine/Ketsji/KX_WorldInfo.h @@ -88,7 +88,7 @@ public: void setMistIntensity(float intensity); void setMistColor(float r, float g, float b); void setBackColor(float r, float g, float b); - const float *getBackColor() const; + const float *getBackColorConverted() const; void setAmbientColor(float r, float g, float b); void UpdateBackGround(); void UpdateWorldSettings(); diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index 2f85122cae8..0850995eaaf 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -109,7 +109,7 @@ void ImageRender::setBackground (float red, float green, float blue, float alpha void ImageRender::setBackgroundFromScene (KX_Scene *scene) { if (scene) { - const float *background_color = scene->GetWorldInfo()->getBackColor(); + const float *background_color = scene->GetWorldInfo()->getBackColorConverted(); copy_v3_v3(m_background, background_color); m_background[3] = 1.0f; }