Jamarr wrote:You say that the progress bar is not shown until after loading is complete, so then what is shown during loading?
the colour of the viewport, in my case its black.
Jamarr wrote:The first obvious thing to check is that you have initialized Ogre and CEGUI prior to loading your applications resources. You cannot include this initialization as part of the loading-progress since these systems have to be setup prior to so that they can render the progress bar.
Yes, of course the systems are initilised before i call inititresources method. Since the program would rather crash than showing nothing.
here the sequnce:
ogre setup (root, window, scenemgr, camera)
cegui setup (bootstrap, scheme)
loading (create progressbar load ressources)
Jamarr wrote:The second obvious thing to check is that your loading-process is broken up over several frames. If you try to initialize, load, and render everything in a single frame of execution you are not going to see any progress since the renderer is never given time to update the screen. For the progress bar to work you have to allow rendering frames to occur during the loading process.
That's why I call "CEGUI::System::getSingleton().renderGUI();" Since I'm not using threads its the only option to update the scene and in fact when i try to render something in OGRE, e.g. simple model or an overlay so its really rendered during loading. "Ogre::Window::update" must be called in this case.
Jamarr wrote:And of course there are other possibilities depending on what your exact setup and logic are. However, since you did not provide provide any relevant information beyond "this does not work, help" it will be difficult for anyone to assist you. Please provide as much contextual information as possible; the more relevant information you provide the easier it will be for someone else to help you.
Ok, sorry when the call for help sounded so poor. This wasnt my intention, since I thought this description should be very informative for those who wanted to update CEGUI manually.
I try to put it this way:
The loading bar is one part of my game and this game is separed in different game states. in fact there are two different game states (intro, main menu) called and rendered corectly before I actually switch to one game state that uses this loading bar. So for this time only resources that are needed in this new game state are loaded so it shouldnt be a problem for CEGUI since all resources for CEGUI were used in a prior game state. But in order to create a new scene I call "CEGUI::WindowManager::getSingleton().destroyAllWindows();" and go on with this sequence:
create scene manager
setup camera (+ viewport)
create progress bar
call "Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup" (now everything updated by resource listener. i.e. renderGUI/window::update)
destroy progress bar and setup the actual game scene - in this case I commented out the destruction of the progress bar to see the effect if it's rendered at all and yes its really rendered, so it should'n be a setup issue.
As already mentioned rendering an OGRE overlay like in the sample browser is not a problem but there is a problem to render CEGUI widgets manually calling "renderGUI". So my question was just simple if I forgot to do something additional to this call to get things be rendered.