BGE BugFix [#25711]render.setBackgroundColor() does not work:
Since rev.2 (hans ftw) we have a strange situation where horizon color was being used at Convert time for the WorldInfo background color (and for the fog). However through the Python API only the Rasterizer background color was being updated. On top of that the KX_KetsjiEngine.cpp::SetBackGround was using the WorldInfo bgcolor when render mode was the potato one (TEXTURED). Bottomline, when in potato mode the glClearColor used was the original one in worldinfo, not the API updated one in Rasterized.
This commit is contained in:
@@ -923,6 +923,11 @@ static PyObject* gPySetBackgroundColor(PyObject*, PyObject* value)
|
||||
{
|
||||
gp_Rasterizer->SetBackColor(vec[0], vec[1], vec[2], vec[3]);
|
||||
}
|
||||
|
||||
KX_WorldInfo *wi = gp_KetsjiScene->GetWorldInfo();
|
||||
if (wi->hasWorld())
|
||||
wi->setBackColor(vec[0], vec[1], vec[2]);
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user