Merge branch 'master' of https://github.com/erwincoumans/bullet3
This commit is contained in:
@@ -266,6 +266,7 @@ void ExampleBrowserThreadFunc(void* userPtr,void* lsMemory)
|
||||
{
|
||||
B3_PROFILE("clock.usleep");
|
||||
clock.usleep(gMinUpdateTimeMicroSecs/10.);
|
||||
exampleBrowser->updateGraphics();
|
||||
} else
|
||||
{
|
||||
B3_PROFILE("exampleBrowser->update");
|
||||
|
||||
@@ -257,7 +257,6 @@ void MyKeyboardCallback(int key, int state)
|
||||
|
||||
} else
|
||||
{
|
||||
|
||||
b3ChromeUtilsStopTimingsAndWriteJsonFile();
|
||||
}
|
||||
#endif //BT_NO_PROFILE
|
||||
@@ -309,8 +308,11 @@ static void MyMouseMoveCallback( float x, float y)
|
||||
bool handled = false;
|
||||
if (sCurrentDemo)
|
||||
handled = sCurrentDemo->mouseMoveCallback(x,y);
|
||||
if (!handled && gui2)
|
||||
handled = gui2->mouseMoveCallback(x,y);
|
||||
if (renderGui)
|
||||
{
|
||||
if (!handled && gui2)
|
||||
handled = gui2->mouseMoveCallback(x,y);
|
||||
}
|
||||
if (!handled)
|
||||
{
|
||||
if (prevMouseMoveCallback)
|
||||
@@ -327,9 +329,11 @@ static void MyMouseButtonCallback(int button, int state, float x, float y)
|
||||
if (sCurrentDemo)
|
||||
handled = sCurrentDemo->mouseButtonCallback(button,state,x,y);
|
||||
|
||||
if (!handled && gui2)
|
||||
handled = gui2->mouseButtonCallback(button,state,x,y);
|
||||
|
||||
if (renderGui)
|
||||
{
|
||||
if (!handled && gui2)
|
||||
handled = gui2->mouseButtonCallback(button,state,x,y);
|
||||
}
|
||||
if (!handled)
|
||||
{
|
||||
if (prevMouseButtonCallback )
|
||||
@@ -1125,6 +1129,18 @@ bool OpenGLExampleBrowser::requestedExit()
|
||||
return s_window->requestedExit();
|
||||
}
|
||||
|
||||
void OpenGLExampleBrowser::updateGraphics()
|
||||
{
|
||||
if (sCurrentDemo)
|
||||
{
|
||||
if (!pauseSimulation || singleStepSimulation)
|
||||
{
|
||||
B3_PROFILE("sCurrentDemo->updateGraphics");
|
||||
sCurrentDemo->updateGraphics();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLExampleBrowser::update(float deltaTime)
|
||||
{
|
||||
b3ChromeUtilsEnableProfiling();
|
||||
|
||||
@@ -19,6 +19,8 @@ public:
|
||||
|
||||
virtual void update(float deltaTime);
|
||||
|
||||
virtual void updateGraphics();
|
||||
|
||||
virtual bool requestedExit();
|
||||
|
||||
virtual void setSharedMemoryInterface(class SharedMemoryInterface* sharedMem);
|
||||
|
||||
Reference in New Issue
Block a user