add physics server loopback (both client and server in the same process, using shared memory)

add physics server direct (client and server in the same process, directly processing commands without shared memory transport mechanism)
This commit is contained in:
erwincoumans
2015-11-22 20:50:32 -08:00
parent 7d6c2b77f7
commit 03bf78ef49
23 changed files with 2914 additions and 2086 deletions

View File

@@ -8,6 +8,8 @@
#include "PhysicsClientC_API.h"
#include "PhysicsClient.h"
//#include "SharedMemoryCommands.h"
#include "PhysicsLoopBackC_API.h"
#include "PhysicsDirectC_API.h"
#include "PhysicsClientC_API.h"
@@ -444,7 +446,10 @@ void PhysicsClientExample::initPhysics()
m_selectedBody = -1;
m_prevSelectedBody = -1;
m_physicsClientHandle = b3ConnectSharedMemory(m_sharedMemoryKey);
//m_physicsClientHandle = b3ConnectSharedMemory(m_sharedMemoryKey);
m_physicsClientHandle = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY);
//m_physicsClientHandle = b3ConnectPhysicsDirect();
if (!b3CanSubmitCommand(m_physicsClientHandle))
{
b3Warning("Cannot connect to physics client");