int main(int argc, char* argv[]) { #ifdef PHYSICS_LOOP_BACK b3PhysicsClientHandle sm = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY); #endif #ifdef PHYSICS_SERVER_DIRECT b3PhysicsClientHandle sm = b3ConnectPhysicsDirect(); #endif #ifdef PHYSICS_IN_PROCESS_EXAMPLE_BROWSER #ifdef __APPLE__ b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc,argv); #else b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnect(argc,argv); #endif //__APPLE__ #endif #ifdef PHYSICS_SHARED_MEMORY b3PhysicsClientHandle sm = b3ConnectSharedMemory(SHARED_MEMORY_KEY); #endif //PHYSICS_SHARED_MEMORY #ifdef PHYSICS_UDP b3PhysicsClientHandle sm = b3ConnectPhysicsUDP("localhost",1234); #endif //PHYSICS_UDP testSharedMemory(sm); }
TEST(BulletPhysicsClientServerTest, LoopBackSharedMemory) { b3PhysicsClientHandle sm = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY); testSharedMemory(sm); }
TEST(BulletPhysicsClientServerTest, DirectConnection) { b3PhysicsClientHandle sm = b3ConnectPhysicsDirect(); testSharedMemory(sm); }