Server based non rendering world

Problems building or running the engine, queries about how to use features etc.
Post Reply
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 26

Server based non rendering world

Post 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.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 26

Post 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?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post 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.
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
x 1
Contact:

Post 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.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 26

Post 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).
Post Reply