add multiple shared memory blocks, to allow multiple

simultaneous connections. At the moment, MAX_SHARED_MEMORY_BLOCKS = 2
Note that the amount of shared memory is limited on many systems,
32MB, while one block is already over 1MB at the moment...
You can connect to SHARED_MEMORY using the current key,
and key+1. There are a few commands that cannot currently be
executed in parallel among multiple connections,
since the implementation of the server
caches some data: rendering image (getCameraData),
getting contact point data and getting debug lines.
This commit is contained in:
Erwin Coumans
2017-01-05 18:30:01 -08:00
parent c940f0ec47
commit 0cf869e56a
2 changed files with 138 additions and 138 deletions

View File

@@ -1439,23 +1439,7 @@ void PhysicsServerExample::stepSimulation(float deltaTime)
#if 0
if (m_options == PHYSICS_SERVER_USE_RTC_CLOCK)
{
btClock rtc;
btScalar endTime = rtc.getTimeMilliseconds() + deltaTime*btScalar(800);
while (rtc.getTimeMilliseconds()<endTime)
{
m_physicsServer.processClientCommands();
}
} else
{
//for (int i=0;i<10;i++)
m_physicsServer.processClientCommands();
}
#endif
{
if (m_multiThreadedHelper->m_childGuiHelper->getRenderInterface())
{