pybullet, more robust multi-server connections
Windows shared memory: allow to use custom key. Improve GUI performance on Windows, submit letters in text as a batch (fewer draw-calls) quadruped.py: first try to connect to SHARED_MEMORY, if it fails (<0) use GUI increase Chrome about://tracing json export capacity (press 'p' in Example Browser) UDP physics server: add --port and --sharedMemoryKey command-line arguments PhysicsServerExample: add --sharedMemoryKey command-line option (for VR example too) ExampleBrowser: sleep a few milliseconds if rendering is too fast, use --minUpdateTimeMicroSecs=0 to disable
This commit is contained in:
@@ -224,6 +224,8 @@ enum TestExampleBrowserCommunicationEnums
|
||||
eExampleBrowserHasTerminated
|
||||
};
|
||||
|
||||
static double gMinUpdateTimeMicroSecs = 4000.;
|
||||
|
||||
void ExampleBrowserThreadFunc(void* userPtr,void* lsMemory)
|
||||
{
|
||||
printf("ExampleBrowserThreadFunc started\n");
|
||||
@@ -254,8 +256,20 @@ void ExampleBrowserThreadFunc(void* userPtr,void* lsMemory)
|
||||
do
|
||||
{
|
||||
float deltaTimeInSeconds = clock.getTimeMicroseconds()/1000000.f;
|
||||
clock.reset();
|
||||
exampleBrowser->update(deltaTimeInSeconds);
|
||||
{
|
||||
if (deltaTimeInSeconds > 0.1)
|
||||
{
|
||||
deltaTimeInSeconds = 0.1;
|
||||
}
|
||||
if (deltaTimeInSeconds < (gMinUpdateTimeMicroSecs/1e6))
|
||||
{
|
||||
clock.usleep(gMinUpdateTimeMicroSecs/10.);
|
||||
} else
|
||||
{
|
||||
clock.reset();
|
||||
exampleBrowser->update(deltaTimeInSeconds);
|
||||
}
|
||||
}
|
||||
|
||||
} while (!exampleBrowser->requestedExit() && (args->m_cs->getSharedParam(0)!=eRequestTerminateExampleBrowser));
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user