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
This commit is contained in:
Quentin Wenger 2015-06-24 12:52:54 +02:00 committed by Porteries Tristan
parent 1676fcded0
commit 49aa7b1261
3 changed files with 4 additions and 4 deletions

@ -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) void KX_WorldInfo::setMistType(short type)

@ -88,7 +88,7 @@ public:
void setMistIntensity(float intensity); void setMistIntensity(float intensity);
void setMistColor(float r, float g, float b); void setMistColor(float r, float g, float b);
void setBackColor(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 setAmbientColor(float r, float g, float b);
void UpdateBackGround(); void UpdateBackGround();
void UpdateWorldSettings(); void UpdateWorldSettings();

@ -109,7 +109,7 @@ void ImageRender::setBackground (float red, float green, float blue, float alpha
void ImageRender::setBackgroundFromScene (KX_Scene *scene) void ImageRender::setBackgroundFromScene (KX_Scene *scene)
{ {
if (scene) { if (scene) {
const float *background_color = scene->GetWorldInfo()->getBackColor(); const float *background_color = scene->GetWorldInfo()->getBackColorConverted();
copy_v3_v3(m_background, background_color); copy_v3_v3(m_background, background_color);
m_background[3] = 1.0f; m_background[3] = 1.0f;
} }