Page 1 of 1
Renderwindow hidden by default
Posted: Sun Feb 06, 2011 7:52 am
by Pangamini
Hello
First i would like to thank you for what you are doing, giving such a great library to use for free of charge and keeping it alive.
I would like to display a splash screen that will remain until ogre is fully loaded. The problem is, that root::initialise takes long to run, and the window is visible all the time. I would like to hide it until everything is done, but i can't do it while initialise is not finished. So only solution i see would be if the renderwindow was created hidden by default. Is it possible, or do i need to go to the core?
Thanks again
Edit:
I tried to make separated thread that will run a "while" until it gets GetAutoCreatedWindow and then hide it and close thread, but GetAutoCreatedWindow sets the value at the end of Initialise, not at begin.. so no idea
Re: Renderwindow hidden by default
Posted: Sun Feb 06, 2011 12:12 pm
by CABAListic
Well, it's simple, really. Don't let Root create the window automatically, create a manual window after the call to initialise.
Re: Renderwindow hidden by default
Posted: Sun Feb 06, 2011 3:34 pm
by Pangamini
Well, you mean create Renderwindow manually, or create a window using WinApi? Is there a way how to register such created window as "primary" so the RestoreSettings would affect it?
Because when i ue root::createRenderWindow, the effect is the same.
Re: Renderwindow hidden by default
Posted: Sun Feb 06, 2011 4:12 pm
by CABAListic
I thought your problem was that Root::initialise takes time? If you don't let initialise create an auto window, but create one afterwards (via Root::createRenderWindow), then obviously the RenderWindow won't be shown during the call to Root::initialise.
Of course, you still have to create the RenderWindow before loading resources, maybe that's what you actually meant? If you are using the latest Ogre development version from the repository, then there's a function for RenderWindows, RenderWindow::setHidden, which will hide the window.
Re: Renderwindow hidden by default
Posted: Sun Feb 06, 2011 4:57 pm
by Pangamini
Thanks for the reply
Yeah, i have checked the setHidden, it works - but still it takes a renderwindow to create, before i can hide it, and during this time it's visible
Sure that Initialise takes time, that's why i want to display the splasn during that time, instead of black renderwindow
Re: Renderwindow hidden by default
Posted: Sun Feb 06, 2011 5:19 pm
by CABAListic
If you create the RenderWindow manually with Root::createRenderWindow, you can pass a parameter "hidden" = "true" via miscParams to hide it by default, then it will not be visible at all (until you call setHideen(false)).
Re: Renderwindow hidden by default
Posted: Sun Feb 06, 2011 6:27 pm
by Pangamini
Ah

need to check all those string interfaces.
Thanks for reply
Also, any idea, how to make the manually created renderwindow get all settings from default config file? (Dimensions, fulscreen etc)
Re: Renderwindow hidden by default
Posted: Wed Apr 18, 2012 1:44 pm
by Kinian
CABAListic wrote:Of course, you still have to create the RenderWindow before loading resources, maybe that's what you actually meant? If you are using the latest Ogre development version from the repository, then there's a function for RenderWindows, RenderWindow::setHidden, which will hide the window.
I want to try in this way, but I could not found the function RenderWindow::setHidden.
CABAListic wrote:If you create the RenderWindow manually with Root::createRenderWindow, you can pass a parameter "hidden" = "true" via miscParams to hide it by default, then it will not be visible at all (until you call setHideen(false)).
And it seems no effect with parameter "hidden" = "true".
The version of OGRE is 1.7.2, I want to known how to hide render window.
Re: Renderwindow hidden by default
Posted: Wed Apr 18, 2012 4:03 pm
by jacmoe
But that is not the development version of Ogre..
