0

我正在为 iphone 使用 ogre3d 中的粒子效果

 Ogre::ParticleSystem*  sunParticle = OgreFramework::getSingletonPtr()->m_pSceneMgr-   >createParticleSystem("Smoke", "Examples/Smoke");
sunParticle = OgreFramework::getSingletonPtr()->m_pSceneMgr->createParticleSystem("Smoke", "Examples/Smoke");
 Ogre::SceneNode* particleNode = OgreFramework::getSingletonPtr()->m_pSceneMgr->getRootSceneNode()->createChildSceneNode("Particle");
particleNode->attachObject(sunParticle);

这是我的插件代码

# Defines plugins to load

# Define plugin folder
PluginFolder=./

 # Define plugins
Plugin=RenderSystem_GL
 Plugin=Plugin_ParticleFX

在 staticloader 中也包含这个手动安装

 #ifdef OGRE_STATIC_ParticleFX
     mParticleFXPlugin = OGRE_NEW ParticleFXPlugin();
     root.installPlugin(Plugin_ParticleFX);
        root.loadPlugin(mParticleFXPlugin);

万一

我还添加了 .particle 文件,我认为我遵循了所有步骤 发生了异常:OGRE EXCEPTION(2:InvalidParametersException):在 /Users/davidrogers/Documents/ 的 ParticleSystemManager::createSystem 中找不到所需的模板“Examples/Smoke” Ogre/ogre-v1-7/OgreMain/src/OgreParticleSystemManager.cpp (line 327) 2012-03-22 14:06:46.757 iphonesampleOgreapp[23041:207] 应用程序在应用程序启动结束时应该有一个根视图控制器

4

1 回答 1

0

您还需要指定资源文件夹才能使用实际的粒子脚本。你绝对确定你做对了吗?

看看这个教程

我真的认为这个错误消息听起来像是资源没有正确初始化,或者 - 如果它们是 - 粒子脚本只是错误的。

于 2012-03-28T14:00:56.533 回答