re-enable eGUIHelperSetRgbBackground

This commit is contained in:
erwin coumans 2021-05-07 09:07:40 -07:00
parent cd76d605a9
commit adcf785a4a

View File

@ -133,6 +133,7 @@ enum MultiThreadedGUIHelperCommunicationEnums
eGUIUserDebugRemoveAllParameters,
eGUIHelperResetCamera,
eGUIHelperChangeGraphicsInstanceFlags,
eGUIHelperSetRgbBackground,
};
#include <stdio.h>
@ -1088,7 +1089,18 @@ public:
workerThreadWait();
}
double m_rgbBackground[3];
virtual void setBackgroundColor(const double rgbBackground[3])
{
m_cs->lock();
m_rgbBackground[0] = rgbBackground[0];
m_rgbBackground[1] = rgbBackground[1];
m_rgbBackground[2] = rgbBackground[2];
setSharedParam(1, eGUIHelperSetRgbBackground);
workerThreadWait();
}
int m_graphicsInstanceChangeScaling;
@ -2312,6 +2324,13 @@ void PhysicsServerExample::updateGraphics()
break;
}
case eGUIHelperSetRgbBackground:
{
m_multiThreadedHelper->m_childGuiHelper->setBackgroundColor(m_multiThreadedHelper->m_rgbBackground);
m_multiThreadedHelper->mainThreadRelease();
break;
}
case eGUIHelperChangeGraphicsInstanceScaling:
{
B3_PROFILE("eGUIHelperChangeGraphicsInstanceScaling");