Hi,
is there any possibility to run mogre without any rendering window?
I tried using "TheRoot.Initialise(false)" but then I got some exceptions during resource loading!
Does anybody know if this is even possible and what I need to do?
I would really be grateful if somebody could help me!
Regards
mstoyke
04-09-2010 01:13:33
is there any possibility to run mogre without any rendering window?
I tried using "TheRoot.Initialise(false)" but then I got some exceptions during resource loading!
Does anybody know if this is even possible and what I need to do?
I would really be grateful if somebody could help me!
It's a problem with Ogre, the first render window that is created actually manages all references to the devices and other resources. I think starting with Ogre 1.8 it will be possible to create invisible render windows. But unfortunately it is not supported in 1.7 right now.
Why do you want to start it without a render window?
Oh thats sad! I "need" a windowless mode, because I am using mogre for a server and the window is pretty annoying...
Thanks for your answer!
issingle
04-09-2010 02:08:56
but...why server side need ogre? uh..server side process the logic .if we need some query (ray query etc.) we can use physics system,ODE,Bullent,newton,physX etc.
mstoyke
04-09-2010 02:17:59
It's indeed not the best idea to use a rendering engine like Ogre for the server. Which parts of Mogre/Ogre do you want to use in your server application? Maybe I can give you some advice how to solve this problem without using Mogre for your server. I have a lot experience with client/server development and should be able to help you here.
I am using Mogre together with Newton to do some physics simulation. Mogre helps with loading meshes,
space partitioning and to some small degree it utilizes features of the graphics adapter to do this stuff
efficiently.
The only option I am aware of, is to write this stuff by myself...
mstoyke
05-09-2010 04:59:24
You could try to create your own window and hide it. Pass the handle to the Ogre renderwindow and you should be able to initialize Mogre without any visible window. I'm not sure if this works, but on the other hand I don't see any reason why it shouldn't
Just make sure that you don't try to render the scene while the window is hidden, in my experience this will most certainly crash your application.
Thanks for the suggestion - I will try it.
Great community in here!
smiley80
05-09-2010 14:14:38
Translating mstoyke's suggestion into code:
root.Initialise(false);
form = new System.Windows.Forms.Form();
using (NameValuePairList param = new NameValuePairList())
{
param["externalWindowHandle"] = form.Handle.ToString();
window = root.CreateRenderWindow("", 1, 1, false, param);
}
issingle
06-09-2010 01:52:41
I have a lot experience with client/server development and should be able to help you here.
wow~~,great,Does mstoyke have any blog or website about it? hope share some exp ,great thx.