Nodes OVER interface?

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
Beam

Nodes OVER interface?

Post by Beam »

Hi

My world is in 3d, nodes and terrain. Over that I can have menues (draw2dimage), but that locks me to have all 3d behind all 2d! I wanna add nodes in menys and toolboxes/controlwindows...

Is this doable? It really must be, or else all my projects are in trouble...

Thanks for helping out
Beam
Guest

Post by Guest »

draw all 3d

then draw all 2d guis

then turn zbuffer off

then draw new 3d (in gui elements) overlaid

then turn zbuffer back on!

should work but don't quote me on that ;)
Beam

Post by Beam »

Do I toggle zbuffer with beginScene()?

"then draw new 3d (in gui elements) overlaid "

3d is always nodes right? And I cannot choose when to draw them, I just add them and they get drawn automatically, right?

Thanks
Beam
Beam

Post by Beam »

Any1 knows how to do this? Otherwise I cannot have nice cool 3d-interface, just bitmapps...
MasterD
Posts: 153
Joined: Sun Feb 15, 2004 4:17 pm
Location: Lübeck, Germany
Contact:

Post by MasterD »

I have a similar topic:

I try to draw (render?) certain nodes in front of all other nodes, disregarding the position of other SceneNodes.
(Well, I want to draw gui above these special nodes, but thats only part of it.)

So I've tried: (semi-code)

Code: Select all

drv->beginScene(true, true,..); // reset backbuffer and zbuffer
..->drawAll(..) // smgr, gui, and stuff
drv->endScene();

drv->beginScene(false, true,..); // only reset zbuffer
certainNode->render();
drv->endScene();
in the device->run() - loop.

Which could be what "Guest" meant.
Also I've tried to render "certainNode" after drawing All without resetting the scene, which can not work, since the z-buffer values are still filled.

I don't want to transform the position and scale of my "certainNode" where I want it to be, to a virtual Position, where it will be rendered in front of all other!

So far, so bad,

Matthias
YASS - Yet another Space Shooter
under Devolpment, see http://yass-engine.de
MasterD
Posts: 153
Joined: Sun Feb 15, 2004 4:17 pm
Location: Lübeck, Germany
Contact:

So far, so good (?)

Post by MasterD »

I've should have waited some minutes to post something:

For my purpose, this fixes this:

Code: Select all

video::SMaterial mat = node->getMaterial();
mat.ZBuffer = false;
But I do not know, if with this it is also possible to draw SceneNode's above GUI Element's. Maybe you need to render() your Node's seperatly / again. But I think it is essential to disable ZBuffer at the Node's you want to display in front of your GUI.

Good night / good day,
Matthias
YASS - Yet another Space Shooter
under Devolpment, see http://yass-engine.de
SARIN
Posts: 139
Joined: Fri Oct 29, 2004 3:53 am

Post by SARIN »

change the guienv->drawAll() and the draw2dImage() to be after the smgr->drawAll(). simple
Beam

Post by Beam »

Sarin I dont understand your post.

smgr->drawAll() //draws world
drawIntf() //draw bitmapp interface
guienv->drawAll() //draws premade-irrlicht GUI objects right?

So with this method I could not do what this tread is about, if I didnt misunderstood you. I want to have animatedSceenNodes and normal smgr->drawAll() in the interface, not just the premade gui-objects.

Thanks anyway
Beam
Post Reply