Page 1 of 1

Splashscreen - Loading bar

Posted: Mon Nov 24, 2014 4:23 pm
by Anthea
Hey,

i'd like to implement a splash screen for our game that is shown during loading of resources. Unfortunately I only found rather old examples that don't work.
Can anyone show how to do this in Ogre 1.9?

http://www.ogre3d.org/forums/viewtopic.php?t=15040 <-- not working in Ogre 1.9 since OgreCore.lib is missing
So far I tried:

Code: Select all

    Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("Essential");

	initOIS();
	createFrameListener();

	mTrayMgr->showLoadingBar();
	Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("General");
	mTrayMgr->hideLoadingBar();

	createCamera();
	mRoot->addFrameListener(mCameraManager);
All I get is a black screen...

Thanks in advance!

Re: Splashscreen - Loading bar

Posted: Mon Nov 24, 2014 4:32 pm
by spacegaier
Anthea wrote:http://www.ogre3d.org/forums/viewtopic.php?t=15040 <-- not working in Ogre 1.9 since OgreCore.lib is missing
What do you mean by that? Nowadays it is called OgreMain, but either way you of course need to link it (and tell the linker where to find it) if that is what the error is complaining about.

Re: Splashscreen - Loading bar

Posted: Mon Nov 24, 2014 5:47 pm
by c6burns
Works for me. I'm using the tutorial framework. In BaseApplication::setup I add the resources for the traymgr before calling BaseApplication::loadResources. So it looks like this:

Code: Select all

	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../../Media/packs/SdkTrays.zip", "Zip", "sdktrays");
	Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("sdktrays");
	createFrameListener();

	mTrayMgr->showLoadingBar();
	loadResources();
	mTrayMgr->hideLoadingBar();

Re: Splashscreen - Loading bar

Posted: Wed Nov 26, 2014 9:31 am
by Anthea
Okey, I reverted to the Basetutorial and that worked for me. Seems that I played to much in code :p

Is there anywhere a tutorial how I can change the background or theming of the loading screen?

Re: Splashscreen - Loading bar

Posted: Wed Nov 26, 2014 9:36 am
by c6burns
Unzip SdkTrays.zip and you can see how it has been themed. All the materials and textures are in there.