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 »

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?
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: Scenes and switching between them

Post by frostbyte »

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
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
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 155

Re: Scenes and switching between them

Post by sercero »

If you want to make infinite levels, you can use http://wiki.ogre3d.org/PagedGeometry+Engine

Which loads geometry by demand.
Post Reply