OgreOde dependency on resource group existense

zintus

24-02-2010 15:50:22

Deeply inside OgreOde have dependency on existense of resource group [OgreOde] while displaying debug meshes.
It is located somewhere around OgreOde::DebugLines resources intialization.

Can someone help remove this dependency?

shanefarris

24-02-2010 19:22:31

All I do is re-assign my resources to the OgreOde name. Ogre will say something to something to the affect that your resource is already defined, but it will work. I would think that removing the hard coded name would probably just make things more difficult, example, requiring you to define the resource name and pass it as a parameter. At least for me, its just easier to make this little hack because your code should not be designed for debugging, but allow debugging with a design more nature design.

Thats just my opinion.

zintus

24-02-2010 20:10:28

Thanks for reply!

I see reasons in your approach, maybe it is really a way to solve this issue. I just think that hacking is not a proper way to solve problems.

shanefarris

24-02-2010 21:06:57

I agree, but for me, whenever I have code that is specifically for debugging, or unit testing, I will bend over backwards so that my code's design isn't affected by it. I like to write code as if its production code, and let my unit tests do the hacking if needed. The place I work at now (I'm a software engineer), the lead developer is 100% against singletons because they could save state and isn't good for unit tests. So basically our design is unit test just as much as it is for production, and I don't like that idea. Then again, you'll get just as many people that disagree with me.