Ogre3d particle effect causing error in iPhone

Posted by anu on Game Development See other posts from Game Development or by anu
Published on 2012-03-29T13:28:27Z Indexed on 2012/03/29 17:43 UTC
Read the original article Hit count: 362

Filed under:
|

1) First I have added the Particle Folder from the OgreSDK( Contains Smoke.particle)

2) Added the Smoke.material And smoke.png and smokecolors.ong

3) After this I added the Plugin = Plugin_ParticleFX in the plugins.cfg

Here is my code:

#Defines plugins to load

# Define plugin folder
PluginFolder=./

# Define plugins
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX

4) I have added the particle path in the resources.cfg( adding the particle file in this get crash )

#Resource locations to be added to the 'bootstrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=media/packs/SdkTrays.zip

# Resource locations to be added to the default path
[General]
FileSystem=media/models
FileSystem=media/particle
FileSystem=media/materials/scripts
FileSystem=media/materials/textures
FileSystem=media/RTShaderLib
FileSystem=media/RTShaderLib/materials

Zip=media/packs/cubemap.zip
Zip=media/packs/cubemapsJS.zip
Zip=media/packs/skybox.zip

6) Finally I did all the settings, my code is here:

mPivotNode = OgreFramework::getSingletonPtr()->m_pSceneMgr->getRootSceneNode()->createChildSceneNode();  // create a pivot node

// create a child node and attach an ogre head and some smoke to it
Ogre::SceneNode* headNode = mPivotNode->createChildSceneNode(Ogre::Vector3(100, 0, 0));
headNode->attachObject(OgreFramework::getSingletonPtr()->m_pSceneMgr->createEntity("Head", "ogrehead.mesh"));
headNode->attachObject(OgreFramework::getSingletonPtr()->m_pSceneMgr->createParticleSystem("Smoke", "Examples/Smoke"));

7) I run this, I got the below error:

An exception has occurred: OGRE EXCEPTION(2:InvalidParametersException): Cannot find requested emitter type. in ParticleSystemManager::_createEmitter at /Users/davidrogers/Documents/Ogre/ogre-v1-7/OgreMain/src/OgreParticleSystemManager.cpp (line 353)

8) Getting crash at:

(void)renderOneFrame:(id)sender
{
    if(!OgreFramework::getSingletonPtr()->isOgreToBeShutDown() &&
       Ogre::Root::getSingletonPtr() && Ogre::Root::getSingleton().isInitialised())
    {
      if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isActive())
      {
         mStartTime = OgreFramework::getSingletonPtr()->m_pTimer->getMillisecondsCPU();
//( getting crash here)

Does anyone know what could be causing this?

© Game Development or respective owner

Related posts about iphone

Related posts about ogre