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:
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:
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");