don't postpone release for remote visualizer (otherwise it blocks forever)

This commit is contained in:
Erwin Coumans
2020-12-23 10:42:25 -08:00
parent 3f9d0197ec
commit 375d7097e4
3 changed files with 4 additions and 2 deletions

View File

@@ -123,6 +123,7 @@ struct GUIHelperInterface
virtual void dumpFramesToVideo(const char* mp4FileName){};
virtual void drawDebugDrawerLines(){}
virtual void clearLines(){}
virtual bool isRemoteVisualizer() { return false; }
};
///the DummyGUIHelper does nothing, so we can test the examples without GUI/graphics (in 'console mode')

View File

@@ -2156,8 +2156,8 @@ void PhysicsServerExample::updateGraphics()
m_multiThreadedHelper->m_childGuiHelper->setVisualizerFlag(m_multiThreadedHelper->m_visualizerFlag, m_multiThreadedHelper->m_visualizerEnable);
//postpone the release until an actual frame is rendered
if (flag == COV_ENABLE_SINGLE_STEP_RENDERING)
//postpone the release until an actual frame is rendered, unless it is a remote visualizer
if ((!m_multiThreadedHelper->m_childGuiHelper->isRemoteVisualizer()) && flag == COV_ENABLE_SINGLE_STEP_RENDERING)
{
m_multiThreadedHelper->getCriticalSection()->setSharedParam(1, eGUIHelperSetVisualizerFlagCheckRenderedFrame);
}

View File

@@ -70,6 +70,7 @@ struct RemoteGUIHelperTCP : public GUIHelperInterface
virtual void removeAllUserDebugItems();
int uploadData(const unsigned char* data, int sizeInBytes, int slot);
virtual bool isRemoteVisualizer() { return true; }
};
#endif //REMOTE_HELPER_TCP_H