fix shadowmap crash on some Intel GPUs, see https://github.com/bulletphysics/bullet3/issues/4

remove targetdir from all libraries in premake, so it is much easier to create a separate folder for all binary+lib
transmit the serialized btMultiBody data back from server to client, after the server loads a URDF file. This includes base+link+joint names
tweak the serialization routines, so it is easier to skip pointers and to serialize directly to a shared memory buffer
also tweak the serialization code to allow to process data without 'DNA' schema data (assuming file-DNA = memory DNA)
This commit is contained in:
erwincoumans
2015-07-10 22:20:06 -07:00
parent f6f76901fd
commit 6c9ce344ea
35 changed files with 340 additions and 120 deletions

View File

@@ -7,6 +7,7 @@
#include "SharedMemoryCommon.h"
#include "../CommonInterfaces/CommonParameterInterface.h"
#include "../Utils/b3ResourcePath.h"
#include "../Extras/Serialize/BulletFileLoader/btBulletFile.h"
class PhysicsClient : public SharedMemoryCommon
{
@@ -181,6 +182,57 @@ void PhysicsClient::processServerCommands()
{
m_serverLoadUrdfOK = true;
b3Printf("Server loading the URDF OK\n");
if (serverCmd.m_dataStreamArguments.m_streamChunkLength>0)
{
bParse::btBulletFile* bf = new bParse::btBulletFile(this->m_testBlock1->m_bulletStreamDataServerToClient,serverCmd.m_dataStreamArguments.m_streamChunkLength);
bf->setFileDNAisMemoryDNA();
bf->parse(false);
for (int i=0;i<bf->m_multiBodies.size();i++)
{
int flag = bf->getFlags();
if ((flag&bParse::FD_DOUBLE_PRECISION)!=0)
{
btMultiBodyDoubleData* mb = (btMultiBodyDoubleData*)bf->m_multiBodies[i];
if (mb->m_baseName)
{
b3Printf("mb->m_baseName = %s\n",mb->m_baseName);
}
for (int link=0;link<mb->m_numLinks;link++)
{
if (mb->m_links[link].m_linkName)
{
b3Printf("mb->m_links[%d].m_linkName = %s\n",link,mb->m_links[link].m_linkName);
}
if (mb->m_links[link].m_jointName)
{
b3Printf("mb->m_links[%d].m_jointName = %s\n",link,mb->m_links[link].m_jointName);
}
}
} else
{
btMultiBodyFloatData* mb = (btMultiBodyFloatData*) bf->m_multiBodies[i];
if (mb->m_baseName)
{
b3Printf("mb->m_baseName = %s\n",mb->m_baseName);
}
for (int link=0;link<mb->m_numLinks;link++)
{
if (mb->m_links[link].m_linkName)
{
b3Printf("mb->m_links[%d].m_linkName = %s\n",link,mb->m_links[link].m_linkName);
}
b3Printf("link [%d] type = %d",link, mb->m_links[link].m_jointType);
if (mb->m_links[link].m_jointName)
{
b3Printf("mb->m_links[%d].m_jointName = %s\n",link,mb->m_links[link].m_jointName);
}
}
}
}
printf("ok!\n");
}
break;
}
case CMD_STEP_FORWARD_SIMULATION_COMPLETED:
@@ -196,10 +248,17 @@ void PhysicsClient::processServerCommands()
case CMD_BULLET_DATA_STREAM_RECEIVED_COMPLETED:
{
b3Printf("Server received bullet data stream OK\n");
break;
}
case CMD_BULLET_DATA_STREAM_RECEIVED_FAILED:
{
b3Printf("Server failed receiving bullet data stream\n");
break;
}