Thought I would share information regarding implementation of a custom scene node and multiple materials. I have implemented a complex custom scene node based on a DCEL structure, ISceneNode and an OctTree for speeding up my display processing. My node can contain multiple materials and faces within the node can belong to a 'material list'. While looking at the code for COctTreeSceneNode, I noticed the following in OnRegisterSceneNode :
Code: Select all
// register according to material types counted
if (solidCount)
SceneManager->registerNodeForRendering(this, scene::ESNRP_SOLID);
if (transparentCount)
SceneManager->registerNodeForRendering(this, scene::ESNRP_TRANSPARENT);
ISceneNode::OnRegisterSceneNode();
Code: Select all
if (IsVisible)
{
SceneManager->registerNodeForRendering(this);
ISceneNode::OnRegisterSceneNode();
}
Anton