I was looking around OGRE, and was toying around the resourcemanager. I did a test where I load a new scene, with these steps:
-call mScManager->clearScene
-ResourceGroupManager::getSingleton().destroyResourceGroup("Map");
-reload the exactly same resource paths from a .cfg file, using the code ripped from OGRE demos
-ResourceGroupManager::getSingleton().initialiseResourceGroup("Map");
-mScManager->setWorldGeometry("terrain.cfg");
-put back the entities that were there before clearing the scene
The group "Map" is nothing more than these directories:
Code: Select all
FileSystem=../../../Media/models
FileSystem=../../../Media/overlays
FileSystem=../../../Media/particle
FileSystem=../../../Media/materials/textures
FileSystem=../../../Media/materials/programs
FileSystem=../../../Media/materials/scripts
Callstack:
Code: Select all
> OgreMain_d.dll!Ogre::GpuProgramParameters::setConstant(unsigned int index=9, const float * val=0x154a118c, unsigned int count=0) Line 221 + 0x3 C++
OgreMain_d.dll!Ogre::GpuProgramParameters::setConstant(unsigned int index=8, const Ogre::Vector4 & vec={...}) Line 154 C++
OgreMain_d.dll!Ogre::FloatGpuParameterControllerValue::setValue(float val=0.26562008) Line 192 C++
OgreMain_d.dll!Ogre::Controller<float>::update() Line 211 + 0x81 C++
OgreMain_d.dll!Ogre::ControllerManager::updateAllControllers() Line 71 C++
OgreMain_d.dll!Ogre::SceneManager::_renderScene(Ogre::Camera * camera=0x062d10a8, Ogre::Viewport * vp=0x0641d0a8, bool includeOverlays=true) Line 810 C++
Plugin_OctreeSceneManager.dll!Ogre::TerrainSceneManager::_renderScene(Ogre::Camera * cam=0x062d10a8, Ogre::Viewport * vp=0x0641d0a8, bool includeOverlays=true) Line 479 + 0x17 C++
OgreMain_d.dll!Ogre::Camera::_renderScene(Ogre::Viewport * vp=0x0641d0a8, bool includeOverlays=true) Line 390 + 0x2a C++
OgreMain_d.dll!Ogre::Viewport::update() Line 187 C++
OgreMain_d.dll!Ogre::RenderTarget::update() Line 108 C++
OgreMain_d.dll!Ogre::RenderWindow::update() Line 67 C++
OgreMain_d.dll!Ogre::RenderSystem::_updateAllRenderTargets() Line 96 + 0x24 C++
OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets() Line 849 + 0x18 C++
OgreMain_d.dll!Ogre::Root::renderOneFrame() Line 639 C++
OgreMain_d.dll!Ogre::Root::startRendering() Line 625 + 0x8 C++
SBS.exe!GameMain::go() Line 97 + 0xe C++
SBS.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x00142428, HINSTANCE__ * __formal=0x00000000) Line 15 + 0xd C++
SBS.exe!WinMainCRTStartup() Line 390 + 0x39 C
kernel32.dll!7c816d4f()
kernel32.dll!7c8399f3()
EDIT: commenting out the programs directory and leaving out any material with vertex or fragment programs fixes it. This seems rather strange as my code uses none of those anyway!
