Expose 'debug rendering' materials

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA

Expose 'debug rendering' materials

Post by nullsquared » Sat Dec 27, 2008 3:32 pm

Maybe I just haven't found it, but currently there's no way to tell Ogre what material to use for rendering AABBs, debug shadows, debug skeletons, and so on. I think it just goes on its own and uses BaseWhiteNoLighting, etc. This isn't exactly a flexible way of doing it once you introduce a deferred renderer :D. I 'fixed' it by unloading BaseWhite and BaseWhiteNoLighting before loading in my own alternatives, like:

Code: Select all

// colour_template plays nicely with each of the engine's renderers, forward and deferred
material white : colour_template
{
    set $colour "1 1 1 1"
}

material BaseWhite : white
{
}

material BaseWhiteNoLighting : white
{
}
It'd be nicer if maybe something like SceneNode::getWireBoundingBox() exists, or more simply, SceneNode::setDebugMaterialName(), or maybe SceneManager::setDebugMaterialName().
0 x

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Re: Expose 'debug rendering' materials

Post by Praetor » Sun Dec 28, 2008 8:21 am

This stuff has been on the TODO for a while. The whole debug renderable system needs to be tweaked. I believe the TODO mentions the debug renderable geometry specifically, but materials should probably be revised as well.
0 x
Game Development, Engine Development, Porting
http://www.darkwindmedia.com

Post Reply