Ara (1) --- Let your OGRE Demo also have loadingbar

xiaoxiao2021-03-06  19

Ara (a) --- Let your demo also have loadingbar

Practice: (1) Join the #include "exampleeloadingbar.h" first in your DEMO main file, add Data Member: ExampleLoadingBar MLoadingBar within the Protected domain of the primary class; (3) In the Protected domain in the primary class Join Member Function: Void LoadResources (Void) {

MLoadingBar.Start (MWindow, 1, 1, 0.75);

// Turn off rendering of everything except overlays mSceneMgr-> clearSpecialCaseRenderQueues (); mSceneMgr-> addSpecialCaseRenderQueue (RENDER_QUEUE_OVERLAY); mSceneMgr-> setSpecialCaseRenderQueueMode (SceneManager :: SCRQM_INCLUDE); // Initialise the rest of the resource groups, parse scripts etc ResourceGroupManager: : getsingleton (). InitialiseallResourceGroups (); ResourceGroupManager :: getsingleton () () () () () () () () () () () () (). getWorldResourceGroupName () () (). getWorldResourceGroupname (), false, true);

// back to full rendering mscenemgr-> clearspecialcaserenderqueues (); mscenemgr-> setspecialcaserenderQueuemode (SceneManager :: scrqm_exclud);

MLoadingBar.finish ();

} Doubt: LoadResources in the Demo's parent class implementation: Virtual Void LoadResources (Void) {// Initialise, Parse Scripts etc ResourcegroupManager :: getsingleton () (); initirateallResourceGroups ();

} After this is Override, the operation inside is included, as shown in red. If you don't do less, so rest assured!

转载请注明原文地址:https://www.9cbs.com/read-41810.html

New Post(0)