Small Patch to OgreBulletCollisionsDebugLines.cpp?

Wuempftlbruempftl

31-05-2010 19:41:27

Recently I began with OgreBullet and with physics in general. Starting an own application, I got some problems: The application crashed when it created OgreBulletCollisions::DebugDrawer().
Soon I found out, that the crash was triggered in OgreBulletCollisionsDebugLines.cpp line 50:
MaterialPtr red = MaterialManager::getSingleton().create("OgreBulletCollisionsDebugLines/Disabled","OgreBulletCollisions");
That’s because OgreBullet doesn’t create the ResourceGroup „OgreBulletCollisions“ anywhere and I didn’t use a “resources.cfg” like the Demo. Defining the resource-group before creating DebugDrawer solved my problem.

I don’t know if this procedure is intention but I suggest adding the following in OgreBulletCollisionsDebugLines.cpp:
if (!_materials_created)
{
if(!ResourceGroupManager::getSingleton().resourceGroupExists("OgreBulletCollisions"))
ResourceGroupManager::getSingleton().createResourceGroup("OgreBulletCollisions");

MaterialPtr red = MaterialManager::getSingleton().create("OgreBulletCollisionsDebugLines/Disabled","OgreBulletCollisions");

Fish

01-06-2010 01:52:22

Ah yes I've run into that with Ogre 1.7.1 before. Are you using Ogre 1.7.1?

- Fish

Wuempftlbruempftl

01-06-2010 11:37:18

Yes, exactly ^^

Fish

01-06-2010 14:01:48

Ok, can you please post a patch to the tracker: http://sourceforge.net/tracker/?group_i ... id=1064241 otherwise it will get lost in the forums.

- Fish