Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -131,7 +131,7 @@ SET(BulletExampleBrowser_SRCS
|
||||
../SharedMemory/TinyRendererVisualShapeConverter.h
|
||||
../SharedMemory/IKTrajectoryHelper.cpp
|
||||
../SharedMemory/IKTrajectoryHelper.h
|
||||
../RenderingExamples/TinyRendererSetup.cpp
|
||||
|
||||
../SharedMemory/PhysicsServer.cpp
|
||||
../SharedMemory/PhysicsClientSharedMemory.cpp
|
||||
../SharedMemory/PhysicsClient.cpp
|
||||
@@ -208,10 +208,16 @@ SET(BulletExampleBrowser_SRCS
|
||||
../MultiThreading/b3PosixThreadSupport.cpp
|
||||
../MultiThreading/b3Win32ThreadSupport.cpp
|
||||
../MultiThreading/b3ThreadSupportInterface.cpp
|
||||
../RenderingExamples/TinyRendererSetup.cpp
|
||||
../RenderingExamples/TimeSeriesCanvas.cpp
|
||||
../RenderingExamples/TimeSeriesCanvas.h
|
||||
../RenderingExamples/TimeSeriesFontData.cpp
|
||||
../RenderingExamples/TimeSeriesFontData.h
|
||||
../RenderingExamples/DynamicTexturedCubeDemo.cpp
|
||||
../RenderingExamples/DynamicTexturedCubeDemo.h
|
||||
../RenderingExamples/TinyVRGui.cpp
|
||||
../RenderingExamples/TinyVRGui.h
|
||||
|
||||
../RoboticsLearning/GripperGraspExample.cpp
|
||||
../RoboticsLearning/GripperGraspExample.h
|
||||
../RoboticsLearning/b3RobotSimAPI.cpp
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "../RenderingExamples/CoordinateSystemDemo.h"
|
||||
#include "../RenderingExamples/RaytracerSetup.h"
|
||||
#include "../RenderingExamples/TinyRendererSetup.h"
|
||||
|
||||
#include "../RenderingExamples/DynamicTexturedCubeDemo.h"
|
||||
#include "../ForkLift/ForkLiftDemo.h"
|
||||
#include "../BasicDemo/BasicExample.h"
|
||||
#include "../Planar2D/Planar2D.h"
|
||||
@@ -291,6 +291,9 @@ static ExampleEntry gDefaultExamples[]=
|
||||
ExampleEntry(1,"CoordinateSystemDemo","Show the axis and positive rotation direction around the axis.", CoordinateSystemCreateFunc),
|
||||
ExampleEntry(1,"Time Series", "Render some value(s) in a 2D graph window, shifting to the left", TimeSeriesCreateFunc),
|
||||
ExampleEntry(1,"TinyRenderer", "Very small software renderer.", TinyRendererCreateFunc),
|
||||
ExampleEntry(1,"Dynamic Texture", "Dynamic updated textured applied to a cube.", DynamicTexturedCubeDemoCreateFunc),
|
||||
|
||||
|
||||
|
||||
//Extended Tutorials Added by Mobeen
|
||||
ExampleEntry(0,"Extended Tutorials"),
|
||||
|
||||
@@ -1087,7 +1087,7 @@ bool OpenGLExampleBrowser::requestedExit()
|
||||
|
||||
void OpenGLExampleBrowser::update(float deltaTime)
|
||||
{
|
||||
|
||||
B3_PROFILE("OpenGLExampleBrowser::update");
|
||||
assert(glGetError()==GL_NO_ERROR);
|
||||
s_instancingRenderer->init();
|
||||
DrawGridData dg;
|
||||
@@ -1139,9 +1139,11 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
singleStepSimulation = false;
|
||||
//printf("---------------------------------------------------\n");
|
||||
//printf("Framecount = %d\n",frameCount);
|
||||
|
||||
B3_PROFILE("sCurrentDemo->stepSimulation");
|
||||
|
||||
if (gFixedTimeStep>0)
|
||||
{
|
||||
|
||||
sCurrentDemo->stepSimulation(gFixedTimeStep);
|
||||
} else
|
||||
{
|
||||
@@ -1167,7 +1169,7 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
sCurrentDemo->renderScene();
|
||||
}
|
||||
{
|
||||
|
||||
B3_PROFILE("physicsDebugDraw");
|
||||
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
sCurrentDemo->physicsDebugDraw(gDebugDrawFlags);
|
||||
}
|
||||
@@ -1179,6 +1181,7 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
|
||||
if (gui2 && s_guiHelper && s_guiHelper->getRenderInterface() && s_guiHelper->getRenderInterface()->getActiveCamera())
|
||||
{
|
||||
B3_PROFILE("setStatusBarMessage");
|
||||
char msg[1024];
|
||||
float camDist = s_guiHelper->getRenderInterface()->getActiveCamera()->getCameraDistance();
|
||||
float pitch = s_guiHelper->getRenderInterface()->getActiveCamera()->getCameraPitch();
|
||||
@@ -1194,6 +1197,7 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
static int toggle = 1;
|
||||
if (renderGui)
|
||||
{
|
||||
B3_PROFILE("renderGui");
|
||||
// if (!pauseSimulation)
|
||||
// processProfileData(s_profWindow,false);
|
||||
|
||||
@@ -1202,7 +1206,7 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
|
||||
saveOpenGLState(s_instancingRenderer->getScreenWidth(), s_instancingRenderer->getScreenHeight());
|
||||
}
|
||||
BT_PROFILE("Draw Gwen GUI");
|
||||
|
||||
if (m_internalData->m_gui)
|
||||
{
|
||||
m_internalData->m_gui->draw(s_instancingRenderer->getScreenWidth(), s_instancingRenderer->getScreenHeight());
|
||||
@@ -1237,6 +1241,7 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
|
||||
if (gui2)
|
||||
{
|
||||
B3_PROFILE("forceUpdateScrollBars");
|
||||
gui2->forceUpdateScrollBars();
|
||||
}
|
||||
|
||||
|
||||
@@ -289,18 +289,25 @@ void OpenGLGuiHelper::syncPhysicsToGraphics(const btDiscreteDynamicsWorld* rbWor
|
||||
return;
|
||||
|
||||
int numCollisionObjects = rbWorld->getNumCollisionObjects();
|
||||
for (int i = 0; i<numCollisionObjects; i++)
|
||||
{
|
||||
btCollisionObject* colObj = rbWorld->getCollisionObjectArray()[i];
|
||||
btVector3 pos = colObj->getWorldTransform().getOrigin();
|
||||
btQuaternion orn = colObj->getWorldTransform().getRotation();
|
||||
int index = colObj->getUserIndex();
|
||||
if (index >= 0)
|
||||
B3_PROFILE("write all InstanceTransformToCPU");
|
||||
for (int i = 0; i<numCollisionObjects; i++)
|
||||
{
|
||||
m_data->m_glApp->m_renderer->writeSingleInstanceTransformToCPU(pos, orn, index);
|
||||
B3_PROFILE("writeSingleInstanceTransformToCPU");
|
||||
btCollisionObject* colObj = rbWorld->getCollisionObjectArray()[i];
|
||||
btVector3 pos = colObj->getWorldTransform().getOrigin();
|
||||
btQuaternion orn = colObj->getWorldTransform().getRotation();
|
||||
int index = colObj->getUserIndex();
|
||||
if (index >= 0)
|
||||
{
|
||||
m_data->m_glApp->m_renderer->writeSingleInstanceTransformToCPU(pos, orn, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_data->m_glApp->m_renderer->writeTransforms();
|
||||
{
|
||||
B3_PROFILE("writeTransforms");
|
||||
m_data->m_glApp->m_renderer->writeTransforms();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ project "App_BulletExampleBrowser"
|
||||
"../TinyRenderer/tgaimage.cpp",
|
||||
"../TinyRenderer/our_gl.cpp",
|
||||
"../TinyRenderer/TinyRenderer.cpp",
|
||||
"../RenderingExamples/TinyRendererSetup.cpp",
|
||||
"../SharedMemory/IKTrajectoryHelper.cpp",
|
||||
"../SharedMemory/IKTrajectoryHelper.h",
|
||||
"../SharedMemory/PhysicsClientC_API.cpp",
|
||||
|
||||
Reference in New Issue
Block a user