CustonSceneNode set rendering queue

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

CustonSceneNode set rendering queue

Post 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?
Tomi
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
bonsalty
Posts: 120
Joined: Thu Dec 10, 2009 1:30 pm
Location: Budapest,Hungary

Post by bonsalty »

"You need to register for the proper render pass."

Is there some example, how should I register it?
Tomi
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post 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);
Never take advice from someone who likes to give advice, so take my advice and don't take it.
Post Reply