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:
Erwin Coumans
2016-12-28 21:51:54 -08:00
parent da2cc483b4
commit 82995a8343
19 changed files with 723 additions and 328 deletions

View File

@@ -10,7 +10,7 @@
#include "Bullet3Common/b3Transform.h"
#include "Bullet3Common/b3CommandLineArgs.h"
#include "../Utils/b3Clock.h"
#include "../ExampleBrowser/OpenGLGuiHelper.h"
#include "../CommonInterfaces/CommonExampleInterface.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h"
@@ -156,6 +156,7 @@ private:
uint32_t m_nWindowWidth;
uint32_t m_nWindowHeight;
bool m_hasContext;
b3Clock m_clock;
private: // OpenGL bookkeeping
int m_iTrackedControllerCount;
@@ -1620,7 +1621,10 @@ void CMainApplication::RenderStereoTargets()
{
B3_PROFILE("CMainApplication::RenderStereoTargets");
sExample->stepSimulation(1./60.);
btScalar dtSec = btScalar(m_clock.getTimeInSeconds());
dtSec = b3Min(dtSec,0.1);
sExample->stepSimulation(dtSec);
m_clock.reset();
glClearColor( 0.15f, 0.15f, 0.18f, 1.0f ); // nice background color, but not black
glEnable( GL_MULTISAMPLE );