From 7e4dfb720742d1e3587c7ffd36d0ce6260e1b51c Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 17 Mar 2016 16:11:53 -0700 Subject: [PATCH] remove SimpleOpenGL3 demo, it breaks some builds reset callback to 0 after exiting a demo to avoid issues --- data/multibody.bullet | Bin 14520 -> 14520 bytes examples/CMakeLists.txt | 2 +- examples/MultiBody/MultiBodySoftContact.cpp | 6 ++++-- examples/RigidBody/RigidBodySoftContact.cpp | 9 +++++++-- examples/SharedMemory/SharedMemoryCommands.h | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/data/multibody.bullet b/data/multibody.bullet index a7d7b447dfb42cdf645e3ce3c61faf5a89c6024d..abbacacce01a1d2da01995c7f1d3372be5c2c9f5 100644 GIT binary patch delta 871 zcmb8s&uSA<6vy#9$;_mQe^6sLR`dK3I+q;1+Cv+Y!- z`KuN@an4ON>)Dq#Sj=D=&oPU8c!b-S$5T8*gh7AKg>)4$Q)+)V*>!?C4Jj8uW zKp(0##p+!xKgJ>^q4xBwl|7F2zS`IOl-jCP?UOsV(~}B`@L&JdOpZ@>j#8&OT5rXl zx7I4L3Y8&Bp?|P5Mp=|y)-7yw`$L}fre|z9IMm$UYafG~b|9>H+-NwEbS|`|ut>B@ zly%NNg+*UCZfjwoz35LBypml@_3dvs*Z80mUp`M=8MoQg(w)OZ-RQv)^g@4lAC93P z$B{!G5l-MFP9dLvJNnlicG_e8^$+LScRy!$yGs5+Hf_1<#jew}4{KayMy4I|TN(c8 syg1UFKr&8Ows+~pU1y3o;orsz#Jbnh7=Uh1H*^+5olG0wGGEXC0pOc*X#fBK delta 681 zcmY+C%PT}-7{*&DF7vNXurFwL@=|b_g>*@VbZV+AdoQLFUJjOmw_1aRo zK%_i^Bd1bcl0{?(6WoL;OXhijKvi{`q@kI{lxF8M()?+3Z$Pe+t~9nuX-@}CrBY5) z(Cju$2|;nQOFHNh&Mk`R0j`^!u^#8B&e9}1DPXCw`Cxt7$Kif35T*r7JcLAGnBMH< z6kb&QAf&&K187%n&+iqA>j1t*^KF`XG@XGOaimrC{E&YBa}qjBiv^?diB7GXbYmK) zkWxg0)*(4VHwE#~BD%tW?+4$9D2M^R7b}48$r@M(8(=fqlR=H-A3x V?uy*)JNy}Zd{{1}KMG&k{{S94e&GNB diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 48d7b57d6..4d26967f1 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ SUBDIRS( HelloWorld BasicDemo ) IF(BUILD_BULLET3) - SUBDIRS( ExampleBrowser SimpleOpenGL3 ThirdPartyLibs/Gwen OpenGLWindow) + SUBDIRS( ExampleBrowser ThirdPartyLibs/Gwen OpenGLWindow) ENDIF() diff --git a/examples/MultiBody/MultiBodySoftContact.cpp b/examples/MultiBody/MultiBodySoftContact.cpp index 89b7530ce..cc5d1ff9a 100644 --- a/examples/MultiBody/MultiBodySoftContact.cpp +++ b/examples/MultiBody/MultiBodySoftContact.cpp @@ -36,6 +36,9 @@ public: }; +extern ContactAddedCallback gContactAddedCallback; + + MultiBodySoftContact::MultiBodySoftContact(struct GUIHelperInterface* helper) :CommonMultiBodyBase(helper), m_once(true) @@ -44,11 +47,10 @@ m_once(true) MultiBodySoftContact::~MultiBodySoftContact() { - + gContactAddedCallback = 0; } -extern ContactAddedCallback gContactAddedCallback; static bool btMultiBodySoftContactCallback(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap,int partId0,int index0,const btCollisionObjectWrapper* colObj1Wrap,int partId1,int index1) { cp.m_contactCFM = 0.3; diff --git a/examples/RigidBody/RigidBodySoftContact.cpp b/examples/RigidBody/RigidBodySoftContact.cpp index 6350fe4d7..1ea1bb002 100644 --- a/examples/RigidBody/RigidBodySoftContact.cpp +++ b/examples/RigidBody/RigidBodySoftContact.cpp @@ -29,6 +29,8 @@ subject to the following restrictions: #include "BulletDynamics/MLCPSolvers/btMLCPSolver.h" #include "BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h" +extern ContactAddedCallback gContactAddedCallback; + struct RigidBodySoftContact : public CommonRigidBodyBase { @@ -36,7 +38,10 @@ struct RigidBodySoftContact : public CommonRigidBodyBase :CommonRigidBodyBase(helper) { } - virtual ~RigidBodySoftContact(){} + virtual ~RigidBodySoftContact() + { + gContactAddedCallback = 0; + } virtual void initPhysics(); virtual void renderScene(); void resetCamera() @@ -49,7 +54,7 @@ struct RigidBodySoftContact : public CommonRigidBodyBase } }; -extern ContactAddedCallback gContactAddedCallback; + static bool btRigidBodySoftContactCallback(btManifoldPoint& cp, const btCollisionObjectWrapper* colObj0Wrap,int partId0,int index0,const btCollisionObjectWrapper* colObj1Wrap,int partId1,int index1) { cp.m_contactCFM = 0.3; diff --git a/examples/SharedMemory/SharedMemoryCommands.h b/examples/SharedMemory/SharedMemoryCommands.h index e0b2bf9d4..198afc092 100644 --- a/examples/SharedMemory/SharedMemoryCommands.h +++ b/examples/SharedMemory/SharedMemoryCommands.h @@ -150,7 +150,7 @@ struct SendDesiredStateArgs //or the maximum applied force/torque for the PD/motor/constraint to reach the desired velocity in CONTROL_MODE_VELOCITY and CONTROL_MODE_POSITION_VELOCITY_PD mode //indexed by degree of freedom, 6 dof base, and then dofs for each link double m_desiredStateForceTorque[MAX_DEGREE_OF_FREEDOM]; - + };