mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-19 05:20:06 +00:00
Merge pull request #583 from erwincoumans/master
fixes in SharedMemory unit test, premake build issue on Linux
This commit is contained in:
commit
bc0717e3de
@ -189,3 +189,9 @@ project "App_BulletExampleBrowser"
|
||||
"main.cpp",
|
||||
"ExampleEntries.cpp",
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
initX11()
|
||||
end
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ project ("Test_SharedMemoryPhysicsClient")
|
||||
"Bullet3Common",
|
||||
"LinearMath"
|
||||
}
|
||||
defines {"PHYSICS_SHARED_MEMORY"}
|
||||
|
||||
files {
|
||||
"test.c",
|
||||
@ -189,4 +190,8 @@ project ("Test_PhysicsServerInProcessExampleBrowser")
|
||||
"test.c",
|
||||
"../../examples/ExampleBrowser/ExampleEntries.cpp",
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
initX11()
|
||||
end
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
//#include "SharedMemoryCommands.h"
|
||||
#ifdef PHYSICS_SHARED_MEMORY
|
||||
#include "SharedMemory/PhysicsClientC_API.h"
|
||||
#endif //PHYSICS_SHARED_MEMORY
|
||||
|
||||
#ifdef PHYSICS_LOOP_BACK
|
||||
#include "SharedMemory/PhysicsLoopBackC_API.h"
|
||||
@ -31,27 +33,21 @@ int main(int argc, char* argv[])
|
||||
double timeStep = 1./60.;
|
||||
double startPosX, startPosY,startPosZ;
|
||||
int imuLinkIndex = -1;
|
||||
|
||||
|
||||
b3PhysicsClientHandle sm=0;
|
||||
int bodyIndex = -1;
|
||||
|
||||
|
||||
printf("hello world\n");
|
||||
#ifdef PHYSICS_LOOP_BACK
|
||||
sm = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY);
|
||||
b3PhysicsClientHandle sm = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY);
|
||||
#endif
|
||||
|
||||
#ifdef PHYSICS_SERVER_DIRECT
|
||||
sm = b3ConnectPhysicsDirect();
|
||||
b3PhysicsClientHandle sm = b3ConnectPhysicsDirect();
|
||||
#endif
|
||||
|
||||
#ifdef PHYSICS_IN_PROCESS_EXAMPLE_BROWSER
|
||||
sm = b3CreateInProcessPhysicsServerAndConnect(argc,argv);
|
||||
#else
|
||||
sm = b3ConnectSharedMemory(SHARED_MEMORY_KEY);
|
||||
#endif //PHYSICS_SERVER_DIRECT
|
||||
|
||||
b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnect(argc,argv);
|
||||
#endif
|
||||
#ifdef PHYSICS_SHARED_MEMORY
|
||||
b3PhysicsClientHandle sm = b3ConnectSharedMemory(SHARED_MEMORY_KEY);
|
||||
#endif //PHYSICS_SHARED_MEMORY
|
||||
|
||||
|
||||
if (b3CanSubmitCommand(sm))
|
||||
|
Loading…
Reference in New Issue
Block a user