Small Patch

Fish

06-02-2009 20:35:05

Added to OgreAddons tracker.

MinGW refuses to link to the inline getRay...() functions. It appears that MinGW is compiling the functions out of existence. The inline variety works fine with MSVC.

Making the addEntity and addMesh methods virtual so that they can be redefined by an inheriting class. Useful for application specific specialization.


Index: Collisions/include/OgreBulletCollisionsRay.h
===================================================================
--- Collisions/include/OgreBulletCollisionsRay.h (revision 2635)
+++ Collisions/include/OgreBulletCollisionsRay.h (working copy)
@@ -49,8 +49,8 @@
void setMaxDistance(Ogre::Real max_distance);

inline const Ogre::Ray &getRay() const;
- inline Ogre::Vector3 getRayStartPoint() const;
- inline Ogre::Vector3 getRayEndPoint() const;
+ Ogre::Vector3 getRayStartPoint() const;
+ Ogre::Vector3 getRayEndPoint() const;

protected:

Index: Collisions/include/Utils/OgreBulletCollisionsMeshToShapeConverter.h
===================================================================
--- Collisions/include/Utils/OgreBulletCollisionsMeshToShapeConverter.h (revision 2635)
+++ Collisions/include/Utils/OgreBulletCollisionsMeshToShapeConverter.h (working copy)
@@ -96,9 +96,9 @@

~StaticMeshToShapeConverter();

- void addEntity(Ogre::Entity *entity,const Ogre::Matrix4 &transform = Ogre::Matrix4::IDENTITY);
+ virtual void addEntity(Ogre::Entity *entity,const Ogre::Matrix4 &transform = Ogre::Matrix4::IDENTITY);

- void addMesh(const Ogre::MeshPtr &mesh, const Ogre::Matrix4 &transform = Ogre::Matrix4::IDENTITY);
+ virtual void addMesh(const Ogre::MeshPtr &mesh, const Ogre::Matrix4 &transform = Ogre::Matrix4::IDENTITY);


protected:



-Fish

tuan kuranes

09-02-2009 16:33:57

Applied, Thanks a lot !
Does Linux/mingw build out of the box from SVN now ?

dermont

09-02-2009 20:03:46

I think you may still be missing the bug in OgreBulletCollisionsTerrainShape.h where "OgreBulletCollisionsPrerequisites.h" should be "OgreBulletCollisionsPreRequisites.h".

../Collisions/include/Shapes/OgreBulletCollisionsTerrainShape.h:5:47: error: OgreBulletCollisionsPrerequisites.h: No such file or directory


Also some of the material files need updated for ogre 1.6.x:

01:58:56: Can't assign material 19 - Default to SubEntity of chassis50 because this Material does not exist. Have you forgotten to define it in a .material script?

eg, chassis.material:

-material 19 - Default
+material "19 - Default"



On Linux (bullet2.7.4beta1) I also had a problem with ConvexDecomposition. When building bullet it appears the ConvexDecomposition headers/libs dont appear to be installed. When building the demo I get the following error:


/media/sda1/LIBRARIES/OGRE/ogreaddons/ogrebullet/Collisions/src/.libs/libOgreBulletCol.so: undefined reference to `ConvexBuilder::~ConvexBuilder()'
/media/sda1/LIBRARIES/OGRE/ogreaddons/ogrebullet/Collisions/src/.libs/libOgreBulletCol.so: undefined reference to `ConvexBuilder::process(ConvexDecomposition::DecompDesc const&)'
/media/sda1/LIBRARIES/OGRE/ogreaddons/ogrebullet/Collisions/src/.libs/libOgreBulletCol.so: undefined reference to `ConvexBuilder::ConvexBuilder(ConvexDecomposition::ConvexDecompInterface*)'
collect2: ld returned 1 exit status
make: *** [OgreBullet_Demo] Error 1


To resolve the above I linked libConvexDecomposition.a against OgreBulletCol and CPPFLAGS to point to the ConvexDecomposition headers.

tuan kuranes

10-02-2009 12:57:56

Thx. Material and Case typo fixed now.
To resolve the above I linked libConvexDecomposition.a against OgreBulletCol and CPPFLAGS to point to the ConvexDecomposition headers.
How can I add that to linux build ? any hindsight/patch ?

deadReaper

16-06-2009 23:16:25

hey dermont, when trying to build the Demos I'm having exact the Problem you mentiond.
I've tried to solve it by adding -lConvexDecomposition when building ogreBullet, but it ain't worked. Seems I've missed something, could you please describe in detail how you solved it.

thanks

dermont

17-06-2009 15:18:36

I think if you're building bullet via autotools config it's called libconvexdecomposition and is in bullet-2.74/Extras. The lib name may be different if your using scons. To build OgreBullet something like this (where rpath may not be needed):


CXXFLAGS="-I/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Common/include -I/media/sda1/LIBRARIES/PHYSICS/bullet-2.74/Extras/ConvexDecomposition" LDFLAGS="-L/media/sda1/LIBRARIES/PHYSICS/bullet-2.74/Extras -Wl,-rpath,/media/sda1/LIBRARIES/PHYSICS/bullet-2.74/Extras" LIBS="-lconvexdecomposition" ./configure

deadReaper

17-06-2009 18:17:33

Thanks for your reply.
I've found the libconvexdecomposition in the Extras folder of bullet and have build and installed it.
The lib name I've used seems to be valid, cause it is accepted, but my initial Problem is still not solved by that.

I still get the undefined reference to `ConvexBuilder::~ConvexBuilder()' and so on.

dermont

18-06-2009 08:25:42

How are you building the demo? Are you linking against libconvexdecomposition? The only other thing I can think of trying is to add the convexdecomposition lib to the end of your ogrebullet/Collisions/src/Makefile.am, e.g:

libOgreBulletCol_la_LIBADD = \
$(OGRE_LIBS) \
$(bullet_LIBS) \
-lconvexdecomposition

deadReaper

18-06-2009 10:42:19

Yay thx that solved that Problem. now I can Build the Demos.

But when I tried to run them I got this:
An exception has occured: OGRE EXCEPTION(5:ItemIdentityException): Unable to locate vertex program called Ogre/BasicVertexPrograms/AmbientOneTexture. in GpuProgramUsage::setProgramName at OgreGpuProgramUsage.cpp (line 61)

dermont

18-06-2009 11:03:17

I think you need to add some Ogre resources, I got fed up trying to figure which and added everything. This is my resource.cfg file.

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/fonts
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/materials/programs
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/materials/scripts
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/materials/textures
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/models
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/overlays
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/particle
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/gui
FileSystem=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/DeferredShadingMedia
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/cubemap.zip
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/cubemapsJS.zip
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/dragon.zip
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/fresneldemo.zip
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/ogretestmap.zip
Zip=/media/sda1/LIBRARIES/OGRE/ogre-v1-6-2/Samples/Media/packs/skybox.zip

FileSystem=../Media
FileSystem=../Media/materials
FileSystem=../Media/textures
#FileSystem=../Media/fonts
FileSystem=../Media/models
FileSystem=../Media/overlays
FileSystem=../Media/gui

deadReaper

18-06-2009 17:55:25

I've had tryed it that way but it aint worked, but with your resource file it works :D