I recently decided to see if I could get the Terra terrain component working in my project. Before implementation, the flow of my code was:
Code: Select all
1) Create and initialise Ogre::Root
2) Add my resources into an "Assets" resource group (ResourceGroupManager::addResourceLocation())
3) Load PBS + Unlit HLMS resources
4) Load Texture & HLMS disk caches
5) Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(true);
6) Create scene manager
7) Create camera
8) Setup compositor
Code: Select all
2) Add my resources into an "Assets" resource group & Add the needed terrain resources into a "Terrain" resource group (ResourceGroupManager::addResourceLocation())
3) Load PBS + Unlit + Terra HLMS resources
To fix the crash, this I did the following:
Code: Select all
1) Create and initialise Ogre::Root
2) Add my resources into an "Assets" resource group & Add the needed terrain resources into a "Terrain" resource group (ResourceGroupManager::addResourceLocation())
3) Load PBS + Unlit HLMS resources
4) Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("Terrain", true);
5) Load Terra HLMS resources
6) Load Texture & HLMS disk caches
7) Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(true);
8) Create scene manager
9) Create camera
10) Setup compositor
Thanks.