Expose 'debug rendering' materials
Posted: 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
. I 'fixed' it by unloading BaseWhite and BaseWhiteNoLighting before loading in my own alternatives, like:
It'd be nicer if maybe something like SceneNode::getWireBoundingBox() exists, or more simply, SceneNode::setDebugMaterialName(), or maybe SceneManager::setDebugMaterialName().
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
{
}