_createRenderer cannot find requested renderer type

Mizipzor

15-05-2007 15:50:02

Hi, I got a wierd error here I cant solve.

I want to make a particle effect. I have "Example.particle" defined in the folder "data"; http://rafb.net/p/DWchAs31.html . Its more or less identical to the file bundled with ogre. Ive just changed the name of the particle and the material. The material is in the folder "data\Materials\flare.material"; http://rafb.net/p/6MGfoe74.html .

Then, when I import them I do this:

renderer.loadPlugin("Plugin_ParticleFX")
# Set resources
rm = ogre.ResourceGroupManager.getSingleton()
rm.addResourceLocation("data","FileSystem", "General")
rm.addResourceLocation("data/Materials","FileSystem", "General")
rm.initialiseAllResourceGroups()


It worked fine until I tried to add the particles now. Now I get the error

ogre.renderer.OGRE._ogre_exceptions_.OgreInvalidParametersException: OGRE EXCEPTION(2:): Cannot find requested renderer type. in ParticleSystemManager::_createRenderer at \Development\ogrenew\OgreMain\src\OgreParticleSystemManager.cpp (line 386)

on that last line.

Any ideas whats wrong?

[edit] fixed broken links

Game_Ender

15-05-2007 18:31:19

All your links are broken make sure to remove the "." from the end of the links. Seems like an error in your particle script. Does the particle demo work?

TwoD

15-05-2007 19:47:22

I'm working with Mizi on this. And yes, the demo works. We just copied the effect from the .particle file, changed the material name and texture to our own to have something to test with.

We don't use the sample framework btw. Here's the relevant init code.

renderer = ogre.Root("","")
renderer.loadPlugin("RenderSystem_GL")
renderSystems = renderer.getAvailableRenderers()
renderer.setRenderSystem(renderSystems[0])
renderer.initialise(False)
renderer.loadPlugin("Plugin_CgProgramManager")
renderer.loadPlugin("Plugin_ParticleFX")
rm = ogre.ResourceGroupManager.getSingleton()
rm.addResourceLocation("data","FileSystem", "General")
rm.addResourceLocation("data/Meshes","FileSystem", "General")
rm.addResourceLocation("data/Textures","FileSystem", "General")
rm.addResourceLocation("data/Materials","FileSystem", "General")
rm.initialiseAllResourceGroups()

Missing something?

Game_Ender

16-05-2007 00:46:40

I believe you have to create a render window before you initialiseAllResourceGroups, otherwise you don't have a graphics context.

TwoD

16-05-2007 02:13:04

Thanks! That might have done the trick! I won't be completely sure before Mizipzor commits his latest changes, but so far the init goes well.

I guess the reason why it worked before must be that we didn't load a plugin which requires the context.
The error message does make sense if the particle-definition tries to talk to a billboard renderer which relies on a (as of yet) nonexistent rendering context...