In fact, my question starts from
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=42563
After searching other posts, what I need to do to make a node appear in front of other nodes is to draw it manually after smgr->drawAll();
However, I do not know how to do so.
Could someone please help me out?
How to draw things manually without using smgr?
maybe this-> http://irrlicht.sourceforge.net/docu/cl ... ee51ce35fa ?
Working on game: Marrbles (Currently stopped).
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Yep, use
Just be sure to set the transformations before rendering. I think it was Or something like that.
Code: Select all
node->render()
Code: Select all
driver->setTransformation(ETS_WORLD,node->getAbsoluteTransformation())
Thanks for reminding me of that API.Lonesome Ducky wrote:Yep, useJust be sure to set the transformations before rendering. I think it wasCode: Select all
node->render()
Or something like that.Code: Select all
driver->setTransformation(ETS_WORLD,node->getAbsoluteTransformation())
However, I have a question
If the cube node is rendered in smgr, we can use
Code: Select all
smgr->addCubeSceneNode();
Also, the main question is how can I instantiate this node?
I have tried
Code: Select all
ISceneNode* n = new ISceneNode();
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
I think irrlicht just isn't designed for actual manual rendering, the render() call on a scenenode will probably cause problems outside of a scene manager draw call, since render() will do a check for the scene manager's render pass
When the scene manager is not in a drawing state, render passes won't be updated and nodes which have called render() will not draw to the screen since the scene manager is not in the right render pass
And about direct node instancing, irrlicht does not expose the base scene node classes to the end user, only scene manager functions to create the nodes
This is done because of memory management (the scene manager can automatically drop any node it has created whenever the node is not needed anymore), and because of the nice hierarchical engine structure you get out of it
When the scene manager is not in a drawing state, render passes won't be updated and nodes which have called render() will not draw to the screen since the scene manager is not in the right render pass
And about direct node instancing, irrlicht does not expose the base scene node classes to the end user, only scene manager functions to create the nodes
This is done because of memory management (the scene manager can automatically drop any node it has created whenever the node is not needed anymore), and because of the nice hierarchical engine structure you get out of it
As I believe you mean to get an answer to this question 'Translation and rotation', I posted it there.
Hope it's worth something.
However it is mabe considerable to create your own derived CSceneNode to render debugging info (or edit info).
Hope it's worth something.
However it is mabe considerable to create your own derived CSceneNode to render debugging info (or edit info).
Code: Select all
class IEditableSceneNode : public ISceneNode
{
// implement at least constructor and abstract methods
public:
const core::aabbox3d<f32>& getBoundingBox() const
{
return _boundingBox;
};
virtual render()
{
// rendering stuff
}
private:
core::aabbox3d<f32> BoundingBox;
};
No I am no noob, just checking if your not one too
Thanks to Niko and all others that made Irrlicht possible.
Thanks to Niko and all others that made Irrlicht possible.