Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Wenger <matpi@protonmail.ch>2015-06-24 13:52:54 +0300
committerPorteries Tristan <republicthunderbolt9@gmail.com>2015-06-24 14:03:23 +0300
commit49aa7b1261a45e5e290c12ebc35ef15687971556 (patch)
treec55b1bac83c926f8005882485d5523c81a406cf2
parent1676fcded0ff5a93988444f4d3189a398b004a79 (diff)
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
-rw-r--r--source/gameengine/Ketsji/KX_WorldInfo.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_WorldInfo.h2
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp2
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;
}