Implementation of virtual void CommonRenderInterface::removeGraphicsInstance(int instanceUid)
for GLInstancingRenderer (OpenGL3+) and SimpleOpenGL2Renderer (OpenGL2) Refactored the add/remove object pool in Bullet3Common/b3ResizablePool.h Added CommonRigidBodyBase::deleteRigidBody, also removing its graphics instance.
This commit is contained in:
@@ -179,6 +179,7 @@ enum MultiThreadedGUIHelperCommunicationEnums
|
||||
eGUIUserDebugRemoveItem,
|
||||
eGUIUserDebugRemoveAllItems,
|
||||
eGUIDumpFramesToVideo,
|
||||
eGUIHelperRemoveGraphicsInstance,
|
||||
};
|
||||
|
||||
|
||||
@@ -778,6 +779,15 @@ public:
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
int m_graphicsInstanceRemove;
|
||||
virtual void removeGraphicsInstance(int graphicsUid)
|
||||
{
|
||||
m_graphicsInstanceRemove = graphicsUid;
|
||||
m_cs->lock();
|
||||
m_cs->setSharedParam(1,eGUIHelperRemoveGraphicsInstance);
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
virtual Common2dCanvasInterface* get2dCanvasInterface()
|
||||
{
|
||||
return 0;
|
||||
@@ -1551,7 +1561,15 @@ void PhysicsServerExample::updateGraphics()
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case eGUIHelperRemoveGraphicsInstance:
|
||||
{
|
||||
m_multiThreadedHelper->m_childGuiHelper->removeGraphicsInstance(m_multiThreadedHelper->m_graphicsInstanceRemove);
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
case eGUIHelperCopyCameraImageData:
|
||||
{
|
||||
m_multiThreadedHelper->m_childGuiHelper->copyCameraImageData(m_multiThreadedHelper->m_viewMatrix,
|
||||
|
||||
Reference in New Issue
Block a user