Page 1 of 1

CustonSceneNode set rendering queue

Posted: Tue Aug 17, 2010 5:36 pm
by bonsalty
How to set rendering queue of a customscenenode? I have transparency priority problems. The transparent triangle which is created at last ( on the top )is covered by another triangle created first ( bottom )

I need a workaround with transparency or I need a way to set irrlichts rendering queue. Can somebody help me out?

Posted: Wed Aug 18, 2010 7:53 am
by hybrid
You need to register for the proper render pass. If you are using transparent materials, register for the transparent pass. And make sure you do set the zbuffer parameters correctly. Usually, transparent materials don't write to zbuffer.

Posted: Wed Aug 18, 2010 10:22 am
by bonsalty
"You need to register for the proper render pass."

Is there some example, how should I register it?

Posted: Wed Aug 18, 2010 11:21 am
by Bate

Code: Select all

void CMyNode::OnRegisterSceneNode()
{
  if (IsVisible)
    SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT);

  ISceneNode::OnRegisterSceneNode();
}
Check out E_SCENE_NODE_RENDER_PASS for more information.

Code: Select all

// Plus:
myNode->setMaterialFlag(EMF_ZWRITE_ENABLE, false);