Scenes and switching between them
-
- Gnoblar
- Posts: 1
- Joined: Thu Oct 12, 2017 1:41 am
Scenes and switching between them
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?
-
- Orc Shaman
- Posts: 737
- Joined: Fri May 31, 2013 2:28 am
- x 65
Re: Scenes and switching between them
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
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
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..
coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..
coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
- sercero
- Bronze Sponsor
- Posts: 450
- Joined: Sun Jan 18, 2015 4:20 pm
- Location: Buenos Aires, Argentina
- x 156
Re: Scenes and switching between them
If you want to make infinite levels, you can use http://wiki.ogre3d.org/PagedGeometry+Engine
Which loads geometry by demand.
Which loads geometry by demand.