Page 1 of 1

Server based non rendering world

Posted: Sun Jan 30, 2005 3:00 am
by Slicky
I have an ogre setup on a server that I am trying to get working to use with connected clients.

I am getting the following error:
-----------------------------------
Details:
-----------------------------------
Error #: 9
Function: SubEntity.setMaterialName
Description: Can't assign default material to SubEntity of Floor. Did you forget to call MaterialManager::initialise()?.
File: c:\program files\ogre\ogrenew\ogremain\src\ogresubentity.cpp
Line: 90
Stack unwinding: <<beginning of stack>>
I am using Ogre::DefaultHardwareBufferManager etc since I am not rendering items. I am just trying to store the scene state and manipulate it.

Is there something I need to do with materialmanager? I can't find a call to get the material manager to try and initialise it.

Posted: Sun Jan 30, 2005 4:29 am
by Slicky
Ok I got that worked out using:

Code: Select all

MaterialManager* matMgr;
matMgr = MaterialManager::getSingletonPtr();
matMgr->initialise(); 
Now I hit an assert the the GpuProgramManager doesn't exist. Am I making this harder than it needs to be?

Posted: Sun Jan 30, 2005 1:21 pm
by sinbad
I don't even know why you're using Ogre for a server-side implementation. You would be far better to only use it for clients.

Posted: Sun Jan 30, 2005 6:37 pm
by Clay
Much harder. With proper Object Oriented design you should have your model (all of your game data) decoupled from your view (pretty much everything that calls ogre). This way you can re-use your model and your game mechanics for a server and not even have to link Ogre against the server code.

Good design should solve all your problems in this area.

Posted: Sun Jan 30, 2005 7:49 pm
by Slicky
The plan was to reuse client code on the server. I have attacked it by doing a regular Ogre app and not calling mroot->startrendering. I think that will allow me to manage ogre entities etc but I haven't been able to test it yet.

I understand the comments about being decoupled (and actually they are quite a bit).