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