OgreBullet compile error

adam

22-03-2011 17:04:19

I'm trying to build ogrebullet but I can't because I keep getting errors. Bullet built successfully but when I build ogrebullet it doesn't work. Here is the output in vc++ 2008.

1>------ Build started: Project: OgreBulletCollisions, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>OgreBulletCollisionsPrecompiled.cpp
1>c:\game\bullet-2.77\src\LinearMath/btSerializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
1>c:\game\bullet-2.77\src\LinearMath/btSerializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
1>c:\game\ogrebullet\collisions\include\OgreBulletCollisionsPreRequisites.h(39) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
1>Build log was saved at "file://c:\game\ogrebullet\Collisions\obj\Debug\BuildLog.htm"
1>OgreBulletCollisions - 1 error(s), 3 warning(s)
2>------ Build started: Project: OgreBulletDynamics, Configuration: Debug Win32 ------
2>Compiling...
2>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
2>cl : Command line warning D9025 : overriding '/Zm111' with '/Zm1000'
2>OgreBulletDynamicsPrecompiled.cpp
2>c:\game\bullet-2.77\src\LinearMath/btSerializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
2>c:\game\bullet-2.77\src\LinearMath/btSerializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
2>c:\game\ogrebullet\dynamics\include\OgreBulletDynamicsPreRequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
2>Build log was saved at "file://c:\game\ogrebullet\Dynamics\obj\Debug\BuildLog.htm"
2>OgreBulletDynamics - 1 error(s), 4 warning(s)
3>------ Build started: Project: Dynamics_Demos, Configuration: Debug Win32 ------
3>Compiling...
3>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
3>Constraints_Demo.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>main.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\collisions\include\ogrebulletcollisionsprerequisites.h(39) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>Primitives_Demo.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>Ragdoll_Demo.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>Terrain_Demo.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>TriMesh_Demo.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>Vehicle_Demo.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>BetaGUI.cpp
3>c:\game\ogrebullet\demos\include\betagui.h(8) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>OgreBulletApplication.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\collisions\include\ogrebulletcollisionsprerequisites.h(39) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>OgreBulletGuiListener.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>OgreBulletInputListener.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\dynamics\include\ogrebulletdynamicsprerequisites.h(37) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>OgreBulletListener.cpp
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(247) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\bullet-2.77\src\linearmath\btserializer.h(282) : warning C4311: 'type cast' : pointer truncation from 'char *' to 'long'
3>c:\game\ogrebullet\collisions\include\ogrebulletcollisionsprerequisites.h(39) : fatal error C1083: Cannot open include file: 'Ogre.h': No such file or directory
3>Generating Code...
3>Project : warning PRJ0018 : The following environment variables were not found:
3>$(OGRE_LIBS)
3>$(BULLET_LIBS)
3>$(OIS_HOME)
3>Build log was saved at "file://c:\game\ogrebullet\Demos\Dynamics_Demos\obj\Debug\BuildLog.htm"
3>Dynamics_Demos - 12 error(s), 23 warning(s)
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

It can't seem to find OGRE how do I fix this? I have set the OGRE_HOME, BULLET_HOME and BULLET_ROOT environment variables.

Thanks
Thanks

Latin1

16-06-2011 18:59:00

I'm also working to get OgreBullet to function properly (with Ogre 1.7), so I can solve a few of these problems.

The tutorial I'm using is here, but it's a little out of date, as it deals with version 2.76 (I use 2.78):
http://www.ogre3d.org/tikiwiki/OgreBullet+Tutorial+1&structure=Libraries

However, some of the information comes from the OgreBullet readme file:
https://ogreaddons.svn.sourceforge.net/svnroot/ogreaddons/trunk/ogrebullet/OgreBullet_readme.txt (Don't know how long the link will work.)


First, you need to declare the other environment variables: open a command prompt and for each of the following variables, enter the command "setx VARIABLE_NAME Path\to\folder".

The readme file states the values to give to the variables:
a) OGRE_HOME = The original Ogre directory ex: 'c:\Ogre'
b) OGRE_LIBS = The location of the Ogre lib directory ex: 'c:\OgreBuild\lib'
c) BULLET_ROOT = The root directory for Bullet ex: 'c:\Bullet'
d) BULLET_LIBS = The location of the Bullet lib directory ex: 'c:\Bullet\BulletBuild\lib'
e) (if OIS is built from source) OIS_HOME = The location of your OIS directory ex: 'c:\OIS'

Depending on the OgreBullet version you use, you apparently only need to set either BULLET_HOME *or* BULLET_ROOT. For now, I've set both to the same folder to make things simpler.


Next you need to set the additional Include directories. I created a new environment variable, OGREBULLET_ROOT, to point to the root OgreBullet folder. For all configurations (not just Debug or Release), add the following paths:

  1. Dynamics_Demos: $(OGRE_HOME)\include\OGRE;$(OGRE_HOME)\boost_1_44;$(BULLET_ROOT)\src;$(BULLET_ROOT)\Extras\ConvexDecomposition;$(OGREBULLET_ROOT)\Collisions\include;$(OGREBULLET_ROOT)\Dynamics\include;$(OGREBULLET_ROOT)\Demos\Dynamics_Demos\include;$(OGREBULLET_ROOT)\Demos\include;$(OIS_HOME)

    [/*:m]
  2. OgreBulletCollisions: $(OGRE_HOME)\include\OGRE;$(OGRE_HOME)\boost_1_44;$(BULLET_ROOT)\src;$(BULLET_ROOT)\Extras\ConvexDecomposition;$(OGREBULLET_ROOT)\Collisions\include

    [/*:m]
  3. OgreBulletDynamics: $(OGRE_HOME)\include\OGRE;$(OGRE_HOME)\boost_1_44;$(BULLET_ROOT)\src;$(OGREBULLET_ROOT)\Collisions\include;$(OGREBULLET_ROOT)\Dynamics\include[/*:m][/list:u]
    These all use absolute paths that use environment variables, so if you've defined them, they should work.

    After doing all this, I got an error that said the compiler couldn't find libboost_thread-vc90-mt-gd-1_44.lib, so I found this thread:
    http://stackoverflow.com/questions/3650833/problem-with-boost-library-in-c-project

    that says to add the library (which is in Ogre's Boost folder) to the additional dependencies:
    Tools -> Options -> Projects and solutions -> VC++ Directories, then pick "Library files" in the pull down menu on the right.
    Once there, add Boost's lib folder ($(OGRE_HOME)\boost_1_44\lib).

    The thread also explains how to just add the dependency to the project, but it didn't work for me.

    Now, the problem seems to be solved for both OgreBulletCollisions and OgreBulletDynamics, but I still get an error message for Dynamics_Demos. Something about how the system can't find the path specified.

    ...So I found this thread:
    http://www.ogre3d.org/addonforums/viewtopic.php?f=12&t=14148

    which talks about the Post-build events and checking to make sure the paths are good, but I don't know what they should look like.

    I'm still looking, so if you've figured it out, write it here! I'll do the same. This is mostly to help other newbies out.


    Edit: Okay it turns out it worked. There was an error message because the post-build options used two functions:

    copy $(OGRE_LIBS)\..\bin\$(configurationName) $(TargetPath)
    copy $(OGRE_HOME)\dependencies\bin\$(configurationName) $(TargetPath)


    Apparently, the copy function copies the files from the first directory into the second one. Because I'm using a more recent version of Ogre, the dependencies folder in the second line doesn't exist; I think it's just to make sure the compiler finds the files, but I was getting an error every time, so I just removed the line.

    Anyway, it turns out the post-build options have no effect on the build, according to this page:
    http://visualstudiohacks.com/general/customize-your-project-build-process/

    A failing pre-build event will cause the build to stop, while a failing post-build event will still mark the build as a failure even if the build of the code succeeded without errors.

    So... I guess everything works.

    - Latin1

Tobiasgar

29-08-2011 09:08:05

I am using Bullet Physics v2.78. And Im trying to build this library to be used for ogrebullet. The main problem is that Im getting errors trying to find the Bullet Directory.

Im wondering if maybe my environment variables are setup wrong.

I am using Windows Vista 32 bit, and here are my Environment variables:

BULLET_ROOT: C:\BulletPhys

BULLET_INCLUDE_DIR: C:\BulletPhys\src

as other information I am trying to build these libraries in cMake. Bullet physics builds perfectly, but ogrebullet cant find the libraries needed to configure(Dynamics, Collision, LinearMath, etc.)

So my question is: How would I setup the environment variables so ogrebullet can find them?

If any other information is needed i will provide upon request.

Thanks

Latin1

01-09-2011 22:03:02

I built OgreBullet using Visual Studio.

When you download OgreBullet, there's a file called OgreBullet_VC8.sln. If you have VS 2010, you can still open it, but you'll be asked if you want to convert it, which you do.

Then you add the right paths in the projects' properties (with the environment variables defined just before), and build the OgreBulletCollisions and OgreBulletDynamics projects. You can also try to compile Dynamics_Demos but I remember having trouble with it; either way, you just need the other two projects to generate the needed lib files.

DerReinhardt

01-11-2012 19:12:51

I built OgreBullet using Visual Studio.

When you download OgreBullet, there's a file called OgreBullet_VC8.sln. If you have VS 2010, you can still open it, but you'll be asked if you want to convert it, which you do.

Then you add the right paths in the projects' properties (with the environment variables defined just before), and build the OgreBulletCollisions and OgreBulletDynamics projects. You can also try to compile Dynamics_Demos but I remember having trouble with it; either way, you just need the other two projects to generate the needed lib files.


Hi,

I did just that. I don't have linking problems but I still get cast problems. I'm using VC++ 2010 Express on Windows 7 64-bit.
This is the output of the builds:

OgreBulletCollisions:
1>------ Build started: Project: OgreBulletCollisions, Configuration: Debug Win32 ------
1> OgreBulletCollisionsRay.cpp
1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2440: 'const_cast' : cannot convert from 'btCollisionWorld::RayResultCallback *const ' to 'btCollisionWorld::ClosestRayResultCallback *'
1> Conversion from pointer to base class to pointer to derived class requires an explicit cast (other than const_cast)
1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2227: left of '->m_collisionObject' must point to class/struct/union/generic type
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

:/

dermont

03-11-2012 06:06:42

I built OgreBullet using Visual Studio.

When you download OgreBullet, there's a file called OgreBullet_VC8.sln. If you have VS 2010, you can still open it, but you'll be asked if you want to convert it, which you do.

Then you add the right paths in the projects' properties (with the environment variables defined just before), and build the OgreBulletCollisions and OgreBulletDynamics projects. You can also try to compile Dynamics_Demos but I remember having trouble with it; either way, you just need the other two projects to generate the needed lib files.


Hi,

I did just that. I don't have linking problems but I still get cast problems. I'm using VC++ 2010 Express on Windows 7 64-bit.
This is the output of the builds:

OgreBulletCollisions:
1>------ Build started: Project: OgreBulletCollisions, Configuration: Debug Win32 ------
1> OgreBulletCollisionsRay.cpp
1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2440: 'const_cast' : cannot convert from 'btCollisionWorld::RayResultCallback *const ' to 'btCollisionWorld::ClosestRayResultCallback *'
1> Conversion from pointer to base class to pointer to derived class requires an explicit cast (other than const_cast)
1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2227: left of '->m_collisionObject' must point to class/struct/union/generic type
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

:/


I'm guessing that you are using bullet 2.81, you may have to make some updates to the code, see the changes for BT_BULLET_VERSION>=281. I've only tested the OgreBullet demo so there may be other changes required.


Index: Collisions/src/OgreBulletCollisionsWorld.cpp
===================================================================
--- Collisions/src/OgreBulletCollisionsWorld.cpp (revision 2978)
+++ Collisions/src/OgreBulletCollisionsWorld.cpp (working copy)
@@ -182,7 +182,11 @@
return false;
}
// -------------------------------------------------------------------------
+#if BT_BULLET_VERSION>=281
+Object *CollisionsWorld::findObject(const btCollisionObject *object) const
+#else
Object *CollisionsWorld::findObject(btCollisionObject *object) const
+#endif
{
std::deque<Object *>::const_iterator it = mObjects.begin();
while (it != mObjects.end())
@@ -223,9 +227,16 @@
{
btPersistentManifold* contactManifold = mWorld->getDispatcher()->getManifoldByIndexInternal(i);

+#if BT_BULLET_VERSION>=281
+ const btCollisionObject* obA = contactManifold->getBody0();
+ const btCollisionObject* obB = contactManifold->getBody1();
+
+#else
btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0());
btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1());
+#endif

+
contactManifold->refreshContactPoints(obA->getWorldTransform(),obB->getWorldTransform());

const unsigned int numContacts = contactManifold->getNumContacts();
Index: Collisions/src/Makefile.am
===================================================================
--- Collisions/src/Makefile.am (revision 2978)
+++ Collisions/src/Makefile.am (working copy)
@@ -33,5 +33,7 @@

libOgreBulletCol_la_LIBADD = \
$(OGRE_LIBS) \
- $(bullet_LIBS)
+ $(bullet_LIBS) \
+ -lConvexDecomposition
+

Index: Collisions/src/Utils/OgreBulletCollisionsMeshToShapeConverter.cpp
===================================================================
--- Collisions/src/Utils/OgreBulletCollisionsMeshToShapeConverter.cpp (revision 2978)
+++ Collisions/src/Utils/OgreBulletCollisionsMeshToShapeConverter.cpp (working copy)
@@ -32,7 +32,11 @@

#include "Utils/OgreBulletCollisionsMeshToShapeConverter.h"

+#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+#include "ConvexDecomposition/ConvexBuilder.h"
+#else
#include "ConvexBuilder.h"
+#endif

#include "BulletCollision/CollisionShapes/btShapeHull.h"

@@ -305,7 +309,7 @@
assert((sz.x > 0.0) && (sz.y > 0.0) && (sz.y > 0.0) &&
("Size of box must be greater than zero on all axes"));

- BoxCollisionShape* shape = new BoxCollisionShape(sz);
+ BoxCollisionShape* shape = new BoxCollisionShape(sz*0.5);
return shape;
}
//------------------------------------------------------------------------------------------------
@@ -316,7 +320,7 @@
assert((sz.x > 0.0) && (sz.y > 0.0) && (sz.y > 0.0) &&
("Size of Cylinder must be greater than zero on all axes"));

- CylinderCollisionShape* shape = new CylinderCollisionShape(sz, Vector3::UNIT_X);
+ CylinderCollisionShape* shape = new CylinderCollisionShape(sz*0.5, Vector3::UNIT_X);
return shape;
}
//------------------------------------------------------------------------------------------------
@@ -1092,4 +1096,4 @@
//geom->setPosition(cap_orig + (boneOrientation * (cap_dirLength * 0.5)));

return geom;
-}
\ No newline at end of file
+}
Index: Collisions/include/OgreBulletCollisionsWorld.h
===================================================================
--- Collisions/include/OgreBulletCollisionsWorld.h (revision 2978)
+++ Collisions/include/OgreBulletCollisionsWorld.h (working copy)
@@ -58,9 +58,12 @@

bool isObjectregistered(Object *) const;
Object *findObject(Ogre::SceneNode *node) const;
+#if BT_BULLET_VERSION>=281
+ Object *findObject(const btCollisionObject *object) const;
+#else
Object *findObject(btCollisionObject *object) const;
+#endif

-
// mShowDebugContactPoints getter
bool getShowDebugContactPoints() const { return mShowDebugContactPoints; }
// mShowDebugContactPoints setter
Index: configure.ac
===================================================================
--- configure.ac (revision 2978)
+++ configure.ac (working copy)
@@ -22,6 +22,13 @@
AC_SUBST(bullet_CFLAGS)
AC_SUBST(bullet_LIBS)

+PKG_CHECK_MODULES(OIS, [OIS >= 1.2.0],,
+ AC_MSG_ERROR([OIS is required to compile OgreBullet Demos]))
+AC_SUBST(OIS_CFLAGS)
+AC_SUBST(OIS_LIBS)
+
+
+
AC_CONFIG_FILES([Makefile
Collisions/Makefile
Collisions/src/Makefile
@@ -34,6 +41,7 @@
Dynamics/include/Makefile
Dynamics/include/Constraints/Makefile
Dynamics/include/Prefab/Makefile
+ Demos/Makefile
OgreBullet.pc
])

Index: bin/resources.cfg
===================================================================
--- bin/resources.cfg (revision 0)
+++ bin/resources.cfg (working copy)
@@ -0,0 +1,21 @@
+
+
+[Bootstrap]
+Zip=../Demos/Media/packs/OgreCore.zip
+
+[Bullet]
+FileSystem=../Demos/Media/materials/programs
+FileSystem=../Demos/Media/materials/scripts
+FileSystem=../Demos/Media
+FileSystem=../Demos/Media/fonts
+FileSystem=../Demos/Media/textures
+FileSystem=../Demos/Media/materials
+FileSystem=../Demos/Media/models
+FileSystem=../Demos/Media/overlays
+FileSystem=../Demos/Media/gui
+
+#[OgreBulletCollisions]
+#FileSystem=../Demos/Media/gui
+
+
+
Index: bin/plugins.cfg
===================================================================
--- bin/plugins.cfg (revision 0)
+++ bin/plugins.cfg (working copy)
@@ -0,0 +1,12 @@
+# Defines plugins to load
+
+# Define plugin folder
+PluginFolder=/home/dermont/Development/OGRE/sdk/v1-8/lib/OGRE
+
+# Define D3D rendering implementation plugin
+Plugin=RenderSystem_GL.so
+Plugin=Plugin_ParticleFX.so
+Plugin=Plugin_BSPSceneManager.so
+Plugin=Plugin_OctreeSceneManager.so
+Plugin=Plugin_CgProgramManager.so
+
Index: autogen.sh
===================================================================
--- autogen.sh (revision 2978)
+++ autogen.sh (working copy)
@@ -1,10 +1,10 @@
#!/bin/sh

rm -f config.cache
-rm -drf autom4te.cache
+rm -rf autom4te.cache
libtoolize --force
echo "Running aclocal"
-aclocal -I .
+aclocal -I . $ACLOCAL_FLAGS
echo "Running autoheader"
autoheader
echo "Running automake"
Index: Dynamics/src/OgreBulletDynamicsWorld.cpp
===================================================================
--- Dynamics/src/OgreBulletDynamicsWorld.cpp (revision 2978)
+++ Dynamics/src/OgreBulletDynamicsWorld.cpp (working copy)
@@ -108,9 +108,14 @@
{
btPersistentManifold* contactManifold = mWorld->getDispatcher()->getManifoldByIndexInternal(i);

+#if BT_BULLET_VERSION>=281
+ const btCollisionObject* obA = contactManifold->getBody0();
+ const btCollisionObject* obB = contactManifold->getBody1();
+
+#else
btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0());
btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1());
-
+#endif
contactManifold->refreshContactPoints(obA->getWorldTransform(),obB->getWorldTransform());

const unsigned int numContacts = contactManifold->getNumContacts();
Index: Demos/Dynamics_Demos/src/Vehicle_Demo.cpp
===================================================================
--- Demos/Dynamics_Demos/src/Vehicle_Demo.cpp (revision 2978)
+++ Demos/Dynamics_Demos/src/Vehicle_Demo.cpp (working copy)
@@ -485,4 +485,4 @@

return OgreBulletListener::frameStarted(elapsedTime);
}
-// -------------------------------------------------------------------------
\ No newline at end of file
+// -------------------------------------------------------------------------
Index: Demos/Makefile.am
===================================================================
--- Demos/Makefile.am (revision 0)
+++ Demos/Makefile.am (working copy)
@@ -0,0 +1,33 @@
+noinst_PROGRAMS = OgreBullet_Demo
+
+INCLUDES = ${OGRE_CFLAGS} \
+ ${bullet_CFLAGS} \
+ ${OIS_CFLAGS} \
+ -I$(top_srcdir)/Dynamics/include \
+ -I$(top_srcdir)/Dynamics/include/Constraints \
+ -I$(top_srcdir)/Collisions/include \
+ -I$(top_srcdir)/Collisions/include/Debug \
+ -I$(top_srcdir)/Collisions/include/Shapes \
+ -I$(top_srcdir)/Collisions/include/Utils \
+ -I$(top_srcdir)/Demos/include \
+ -I$(top_srcdir)/Demos/Dynamics_Demos/include
+
+
+OgreBullet_Demo_SOURCES = src/BetaGUI.cpp \
+ src/OgreBulletApplication.cpp \
+ src/OgreBulletInputListener.cpp \
+ src/OgreBulletGuiListener.cpp \
+ src/OgreBulletListener.cpp \
+ Dynamics_Demos/src/Constraints_Demo.cpp \
+ Dynamics_Demos/src/main.cpp \
+ Dynamics_Demos/src/Primitives_Demo.cpp \
+ Dynamics_Demos/src/Vehicle_Demo.cpp \
+ Dynamics_Demos/src/TriMesh_Demo.cpp \
+ Dynamics_Demos/src/Ragdoll_Demo.cpp \
+ Dynamics_Demos/src/Terrain_Demo.cpp
+
+OgreBullet_Demo_LDFLAGS = -L$(top_builddir)/Dynamics/src -L$(top_builddir)/Collisions/src
+OgreBullet_Demo_LDADD = -lOgreBulletDyn -lOgreBulletCol ${OGRE_LIBS} $(bullet_LIBS) $(OIS_LIBS)
+
+install-exec-local:
+ $(INSTALL_PROGRAM) .libs/OgreBullet_Demo $(top_builddir)/bin
Index: Demos/Media/materials/WT.material
===================================================================
--- Demos/Media/materials/WT.material (revision 2978)
+++ Demos/Media/materials/WT.material (working copy)
@@ -4,7 +4,7 @@
{
pass
{
- //lighting off
+ lighting off
diffuse vertexcolour
}
}
@@ -39,4 +39,4 @@
}
}
}
-}
\ No newline at end of file
+}
Index: Makefile.am
===================================================================
--- Makefile.am (revision 2978)
+++ Makefile.am (working copy)
@@ -1,4 +1,4 @@
-SUBDIRS = Collisions Dynamics
+SUBDIRS = Collisions Dynamics Demos

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = OgreBullet.pc

rachyl5656tip7

28-01-2015 06:22:39

@Latin1 Thank you for your effort. It helps.