Running Ogre without a window
- muppet
- Halfling
- Posts: 66
- Joined: Thu Jan 13, 2005 2:38 pm
- Location: UK
Running Ogre without a window
Hi all,
I know the title is a bit strange...but...Is there a way to run Ogre without opening a window and rendering things in it? I know that you can simply stop entities from drawing, and just have a black window. However I was wondering if it was possible to stop the window opening at all and have everything run in an 'null'/invisible window (or that sort of thing).
The reason I am asking this is due to the nature of our university games project. Our game is a muliplayer game, which runs from a dedicated server. In this sense we want Ogre to run and update entity positions, animations etc. and then send out these changes to the clients who then render these changes accordingly. However it would be ideal if this was possible without visually running Ogre on the server too.
Thanks
Muppet
I know the title is a bit strange...but...Is there a way to run Ogre without opening a window and rendering things in it? I know that you can simply stop entities from drawing, and just have a black window. However I was wondering if it was possible to stop the window opening at all and have everything run in an 'null'/invisible window (or that sort of thing).
The reason I am asking this is due to the nature of our university games project. Our game is a muliplayer game, which runs from a dedicated server. In this sense we want Ogre to run and update entity positions, animations etc. and then send out these changes to the clients who then render these changes accordingly. However it would be ideal if this was possible without visually running Ogre on the server too.
Thanks
Muppet
- Robomaniac
- Hobgoblin
- Posts: 508
- Joined: Tue Feb 03, 2004 6:39 am
- :wumpus:
- OGRE Retired Team Member

- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
-
Drew_Benton
- Halfling
- Posts: 95
- Joined: Sun Apr 03, 2005 6:58 pm
You know how you have something like:
Can't you just pass false to that so you don't have a window created?
Code: Select all
if( mRoot->showConfigDialog() )
{
mWindow = mRoot->initialise( true, "Ogre Caption" );
}- CombatWombat
- Greenskin
- Posts: 138
- Joined: Fri Feb 04, 2005 11:05 pm
- Location: Melbourne, Aus
Hey Muppet, I'm interested to find out where you guys went with this. I'm wanting to do exactly the same thing with the dedicated server, and the only option seems to be a null RenderSystem.
(I'm wanting to load meshes via Ogre then use my own collision detection in the server)
Did you end up writing a null RenderSystem?
(I'm wanting to load meshes via Ogre then use my own collision detection in the server)
Did you end up writing a null RenderSystem?
- DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
If you're going to use your own collision detection, and if you're only going to load the meshes, you can do that without ever touching a render system. The XML converter and Mesh upgrader do this. Maybe it's more complicated if you also want to use Ogre's scene graph, but I'm not sure about that.CombatWombat wrote:(I'm wanting to load meshes via Ogre then use my own collision detection in the server)
What are you talking about?friend_of_ACCU wrote:HEY you should add an option to read config from config file of course if your ego is not too high...
- DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
Ah, it's only displayed if you ask for it. (See here for an alternative way to load the configuration.) But that's not what the original post was about.friend_of_ACCU wrote:You could allow to switch off the configuration window popup. That probably could be useful.
- CombatWombat
- Greenskin
- Posts: 138
- Joined: Fri Feb 04, 2005 11:05 pm
- Location: Melbourne, Aus
Thanks, I've wikied how I got it working at this pageDWORD wrote:If you're going to use your own collision detection, and if you're only going to load the meshes, you can do that without ever touching a render system.
- Walley
- Greenskin
- Posts: 120
- Joined: Fri Dec 03, 2004 4:37 am
- Location: Victoria, Australia
In my opinion it's poor design to have a dedicated server running Ogre...
Alongside the additional overhead is the fact that the main thing Ogre does is visualize the information you give it - so trying to have it manage the information and give it out is like doing things in reverse.
Besides, the objects in Ogre generally aren't enough to realistically manage game objects, hence for a decent design you'll need your own classes. It is *these* classes that would be used by the server, not Ogre.
Alongside the additional overhead is the fact that the main thing Ogre does is visualize the information you give it - so trying to have it manage the information and give it out is like doing things in reverse.
Besides, the objects in Ogre generally aren't enough to realistically manage game objects, hence for a decent design you'll need your own classes. It is *these* classes that would be used by the server, not Ogre.
- CombatWombat
- Greenskin
- Posts: 138
- Joined: Fri Feb 04, 2005 11:05 pm
- Location: Melbourne, Aus
Certainly, in complete agreement with all you've said here.Walley wrote:In my opinion it's poor design to have a dedicated server running Ogre...
Alongside the additional overhead is the fact that the main thing Ogre does is visualize the information you give it - so trying to have it manage the information and give it out is like doing things in reverse.
Besides, the objects in Ogre generally aren't enough to realistically manage game objects, hence for a decent design you'll need your own classes. It is *these* classes that would be used by the server, not Ogre.
What I'm after is the mesh data so that I can do hit detection (line of sight, line of fire type stuff) with the same model which I'm using for rendering. Rather than running a second model converter, I'd like to use the Ogre model.
All my game object classes are independent from Ogre (save for the entity/scenenode pointer, but this is only valid where rendering is being done) and they have a pointer to the (shared) collision mesh which is appropriate for them. These shared collision meshes get built from the meshes I get Ogre to load for me.
-
The_Fallen
- Gnoblar
- Posts: 6
- Joined: Thu Jul 21, 2005 9:47 am
Sorry, that I am posting in this thread, but I currently have the exact same problem. I'm working on a client/server game and for the server I also want to use some Ogre classes (for mesh loading, timers, ...).:wumpus: wrote:You could still use the Ogre classes that don't depend on a RenderSystem without initializing a RenderSystem. That's much nicer than a null plugins, I just detest null plugins, but that's something personal.
But when I try to create a timer without some initialisation of Ogre before, I get an assertion error. I create the timer like this:
Code: Select all
m_Timer = Ogre::PlatformManager::getSingleton().createTimer();
Code: Select all
Assertion failed: ms_Singleton, file c:\softwaredevelopment\c++\ogresdk\ogrenew\ogremain\src\ogreplatformmanager.cpp, line 45
thx,
fallen
- CombatWombat
- Greenskin
- Posts: 138
- Joined: Fri Feb 04, 2005 11:05 pm
- Location: Melbourne, Aus
The platform manager singleton must be created before you can use it. Usually this gets done when you create the Ogre Root (note the Root doesn't have to be initialised), but you can create it directly like so:(Ogre::PlatformManager is also an Ogre::Singleton, and the Ogre::Singleton constructor stores the pointer to the singleton away)
You might have more problems to sort out from there onwards, I've got my own timer class so that's why I've not hit this one.
Code: Select all
new Ogre::PlatformManager;You might have more problems to sort out from there onwards, I've got my own timer class so that's why I've not hit this one.
-
The_Fallen
- Gnoblar
- Posts: 6
- Joined: Thu Jul 21, 2005 9:47 am
- CombatWombat
- Greenskin
- Posts: 138
- Joined: Fri Feb 04, 2005 11:05 pm
- Location: Melbourne, Aus
You can safely use Ogre Mesh class if you go through the instructions on this page.The_Fallen wrote:Thanks, but it doesn't work, same problem as before. PlatformManager needs DynLibManager, but somehow I can't create an instance of this class...
So, I will also use my own timer class. But will I run into the same problem, when I use other classes from Ogre (like Mesh etc)?
You can also create the Ogre timer object safely after that same setup, but you may need some additional Ogre calls to get the timers ticking over - I've not looked at how they're implemented.