explicitly remove textures during resetSimulation
move glViewport to Win32Window
This commit is contained in:
@@ -135,6 +135,7 @@ enum MultiThreadedGUIHelperCommunicationEnums
|
||||
eGUIHelperChangeGraphicsInstanceTextureId,
|
||||
eGUIHelperGetShapeIndexFromInstance,
|
||||
eGUIHelperChangeTexture,
|
||||
eGUIHelperRemoveTexture,
|
||||
};
|
||||
|
||||
|
||||
@@ -859,6 +860,17 @@ public:
|
||||
//m_childGuiHelper->createPhysicsDebugDrawer(rbWorld);
|
||||
}
|
||||
|
||||
int m_removeTextureUid;
|
||||
|
||||
virtual void removeTexture(int textureUid)
|
||||
{
|
||||
m_removeTextureUid = textureUid;
|
||||
m_cs->lock();
|
||||
m_cs->setSharedParam(1, eGUIHelperRemoveTexture);
|
||||
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
virtual int registerTexture(const unsigned char* texels, int width, int height)
|
||||
{
|
||||
m_texels = texels;
|
||||
@@ -1878,6 +1890,13 @@ void PhysicsServerExample::updateGraphics()
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
}
|
||||
case eGUIHelperRemoveTexture:
|
||||
{
|
||||
B3_PROFILE("eGUIHelperRemoveTexture");
|
||||
m_multiThreadedHelper->m_childGuiHelper->removeTexture(m_multiThreadedHelper->m_removeTextureUid);
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
}
|
||||
case eGUIHelperRegisterGraphicsShape:
|
||||
{
|
||||
B3_PROFILE("eGUIHelperRegisterGraphicsShape");
|
||||
|
||||
Reference in New Issue
Block a user