PyBullet: explicit sync transform right before hardware OpenGL getCameraImage

This commit is contained in:
Erwin Coumans
2018-03-09 09:56:03 -08:00
parent fe8fd9d45a
commit 159fef5818

View File

@@ -2224,7 +2224,12 @@ void PhysicsServerExample::updateGraphics()
} }
case eGUIHelperCopyCameraImageData: case eGUIHelperCopyCameraImageData:
{ {
B3_PROFILE("eGUIHelperCopyCameraImageData"); B3_PROFILE("eGUIHelperCopyCameraImageData");
if (m_multiThreadedHelper->m_startPixelIndex == 0)
{
m_physicsServer.syncPhysicsToGraphics();
}
m_multiThreadedHelper->m_childGuiHelper->copyCameraImageData(m_multiThreadedHelper->m_viewMatrix, m_multiThreadedHelper->m_childGuiHelper->copyCameraImageData(m_multiThreadedHelper->m_viewMatrix,
m_multiThreadedHelper->m_projectionMatrix, m_multiThreadedHelper->m_projectionMatrix,