Scenes and switching between them

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
jadiah
Gnoblar
Posts: 1
Joined: Thu Oct 12, 2017 1:41 am

Scenes and switching between them

Post by jadiah » Thu Oct 12, 2017 1:47 am

Hello, I'm new to OGRE engine, is there a way to create multiple scenes (for game levels for example) with the ability to switch between them and load/unload resources?
0 x

frostbyte
Orc Shaman
Posts: 724
Joined: Fri May 31, 2013 2:28 am

Re: Scenes and switching between them

Post by frostbyte » Fri Oct 13, 2017 12:57 am

sure there is, for loading/unloading resources look into ResourceGroupManager::addResourceLocation, ResourceGroupManager::initialiseResourceGroup , ResourceGroupManager::destroyResourceGroup https://ogrecave.github.io/ogre/api/1.1 ... nager.html

ogre does support multiple scenes/viewports, but for moving between levels you don't really need multiple scene
just remove all the sceneNodes and destroy/free all the entities, take notice that unloading a resource from memory will probably fail if the resource is still referenced( there is some sort of reference-counter )
i think you can look in the sampleBrowser on how to do the clean-up
1 x
the government took my kudos, now i'm kudosless :?

Post Reply