raygeee
10-04-2009 01:55:07
In my project I've got the option to select several graphics configurations. To get that done I want to destroy Hydrax completely and replace it with a much more simple water animation or a new Hydrax instance. Each time the graphics configuration changes I dispose and delete Hydrax, instantiate it, create it and load a different configuration file. All of this seems to work - no exception and no weird log message.
The problem is, when Ogre renders its next frame I get the following exception:
I've searched the Hydrax resourceGroup and all other resourceGroups and I can't find this resource. Neither does any ResourceManager tell me that he holds this resource. The log file tells me that several resources are being loaded manually but that specific resource isn't among them.
Since VP seems to refer to Viewport I tried destroying/removing my camera and viewport and recreated them. Didn't help - same exception.
I also tried destroying the whole Hydrax resourceGroup and recreated it, added resource locations and initialized it again. Same.
Does anyone have an idea how to solve this? How do I destroy this resource? Or maybe is there another way to recreate Hydrax?
The problem is, when Ogre renders its next frame I get the following exception:
OGRE EXCEPTION(4:ItemIdentityException): Resource with the name _Hydrax_Depth_VP already exists. in ResourceManager::add at ..\src\OgreResourceManager.cpp (line 113)
I've searched the Hydrax resourceGroup and all other resourceGroups and I can't find this resource. Neither does any ResourceManager tell me that he holds this resource. The log file tells me that several resources are being loaded manually but that specific resource isn't among them.
Since VP seems to refer to Viewport I tried destroying/removing my camera and viewport and recreated them. Didn't help - same exception.
I also tried destroying the whole Hydrax resourceGroup and recreated it, added resource locations and initialized it again. Same.
Does anyone have an idea how to solve this? How do I destroy this resource? Or maybe is there another way to recreate Hydrax?