From d70132a90185db78e4444173ed9fbc7d2f5d0933 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Tue, 1 Mar 2016 09:15:55 -0800 Subject: [PATCH] only enable Wavefront obj support for URDF when ENABLE_URDF_OBJ is defined. add destructor for SampleJob1 --- examples/ExampleBrowser/ExampleEntries.cpp | 8 ++++---- examples/ExampleBrowser/premake4.lua | 1 + examples/MultiThreading/MultiThreadingExample.cpp | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/ExampleBrowser/ExampleEntries.cpp b/examples/ExampleBrowser/ExampleEntries.cpp index 6a2a10924..c8377c7fb 100644 --- a/examples/ExampleBrowser/ExampleEntries.cpp +++ b/examples/ExampleBrowser/ExampleEntries.cpp @@ -1,5 +1,3 @@ - - #include "ExampleEntries.h" #include "LinearMath/btAlignedObjectArray.h" @@ -11,7 +9,9 @@ #include "../BasicDemo/BasicExample.h" #include "../Planar2D/Planar2D.h" #include "../Benchmarks/BenchmarkDemo.h" +#ifdef ENABLE_URDF_OBJ #include "../Importers/ImportObjDemo/ImportObjExample.h" +#endif #include "../Importers/ImportBsp/ImportBspExample.h" #include "../Importers/ImportColladaDemo/ImportColladaSetup.h" #include "../Importers/ImportSTLDemo/ImportSTLSetup.h" @@ -194,9 +194,9 @@ static ExampleEntry gDefaultExamples[]= ExampleEntry(0,"Importers"), ExampleEntry(1,"Import .bullet", "Load a binary .bullet file. The serialization mechanism can deal with versioning, differences in endianess, 32 and 64bit, double/single precision. It is easy to save a .bullet file, see the examples/Importers/ImportBullet/SerializeDemo.cpp for a code example how to export a .bullet file.", SerializeBulletCreateFunc), - +#ifdef ENABLE_URDF_OBJ ExampleEntry(1,"Wavefront Obj", "Import a Wavefront .obj file", ImportObjCreateFunc, 0), - +#endif ExampleEntry(1,"Quake BSP", "Import a Quake .bsp file", ImportBspCreateFunc, 0), ExampleEntry(1,"COLLADA dae", "Import the geometric mesh data from a COLLADA file. This is used as part of the URDF importer. This loader can also be used to import collision geometry in general. ", ImportColladaCreateFunc, 0), diff --git a/examples/ExampleBrowser/premake4.lua b/examples/ExampleBrowser/premake4.lua index 7a27a65e1..fe05ef5fa 100644 --- a/examples/ExampleBrowser/premake4.lua +++ b/examples/ExampleBrowser/premake4.lua @@ -20,6 +20,7 @@ "../../src", "../ThirdPartyLibs", } + defines {"ENABLE_URDF_OBJ"} if _OPTIONS["lua"] then includedirs{"../ThirdPartyLibs/lua-5.2.3/src"} diff --git a/examples/MultiThreading/MultiThreadingExample.cpp b/examples/MultiThreading/MultiThreadingExample.cpp index 0cf47c529..2e9f9ee15 100644 --- a/examples/MultiThreading/MultiThreadingExample.cpp +++ b/examples/MultiThreading/MultiThreadingExample.cpp @@ -68,6 +68,8 @@ struct SampleJob1 : public SampleJobInterface m_jobId(jobId) { } + virtual ~SampleJob1() {} + virtual void executeJob(int threadIndex) { printf("start SampleJob1 %d using threadIndex %d\n",m_jobId,threadIndex);