Loading screen

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Loading screen

Post by crioto »

Hi everyone!
I searched the forum found a few similar themes, but the answer to my question is not found.
I need to make the screen "Loading", that all resources are loaded only at the time when I click the Start button in CEGUI. It is this click I can do.
I have a class Loader, which parse XML-files. In these files is stored information on meshes, names, positions and quaternions.
Also, I use scripts Lua, to move my NPC at the right time. But they are beginning to move in when just starting loading level. I need this to happen only when loaded camera.
Also i need to appear Overlay with the word "Loading". I created the overlay and material script for this, showing him at the start of loading and cleaning at the end. But nothing appears on my screen.
Can anybody give me some refences (or advices) to information related to my problem?
Do your work, don't be stupid
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Post by DanielSefton »

Have you seen the example loading bar? (ogre/samples/include/ExampleLoadingBar.h)
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

Yep!
But i can't understand: My screen freeze during the boot sequence. I must, as in example, each time to update the window?
Do your work, don't be stupid
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Post by DanielSefton »

Do you use it like this?
// Load bootstrap resource (OgreCore.zip)

LoadingBar* loadBar = new LoadingBar();

loadBar->start(mRenderWindow,numGroupsInit,numGroupsLoad,initProportion);

// Load resources here.

loadBar->finish();

delete loadBar;
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

Actually not! I don't use ExampleApplication and have my own render loop.
I hust use mOverlay->show() on the starting loading process and mOverlay->hide() at the end.
I don't want to use loading bar. Just "Loading..." word on the black screen
Do your work, don't be stupid
User avatar
volca
Gnome
Posts: 393
Joined: Thu Dec 08, 2005 9:57 pm
x 1
Contact:

Post by volca »

If I understand your question correctly - then yes, you have to manually render frames now and then to ensure the screen stays responsive, or defer your loading to a separate thread, so it won't be blocking any more.
Image
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

volca wrote:If I understand your question correctly - then yes, you have to manually render frames now and then to ensure the screen stays responsive, or defer your loading to a separate thread, so it won't be blocking any more.
Ok, i got it! Thank you
Do your work, don't be stupid
Post Reply