I can control whether an object is rendered or not with" setVisible(true/false)"..
Now I want to render only the nodes that was "added" to a Render Pass..
// PassedIrrDevice->getSceneManager()->drawAll(); // O.K. this works, but I want to..
// Pointers to these are stored in an array inside a given pass.. (they were "add()'ed")
for (u32 I = 0; I < AnimatedMeshNodeCount ; I++)
{
AnimatedMeshesPTRArray[I]->render();
// What must happen AFTER "render()" to actually see it in the frame buffer?
}
// I know it renders, but how do I finalise. i.e swop buffers AFTER all of this..
// Something should happen here after all "render()"s, but what?
Is it a good idea to render selected objects this way?
(considering other overhead inside "draw all" I'm not aware of)
Answer is ... depends. Basically you can do that. Or you can also use additional scenemangers and render them in any order.
But maybe check the code of SceneManager::drawAll to be aware of what it's doing.
What you are missing now are some things, but you can do them yourself as well probably.
First is that you need to call OnAnimate for animated nodes.
Next is - you need some sorting for transparent nodes (stuff further away has to be drawn first).
And if you run into any problems - it's probably related to zbuffer in some way, so be aware what is written in there.
I used a list of empty -dummy- scene nodes that acted as "root" for their children to be rendered, and were the first attached to the scene manager, as they were the first processed, they acted as "render-Passes" or "layers" as I named them,
pros: lighting manager may tell you which render pass is being rendered in each moment, and act accordingly
cons: If you aren't careful you might be calling "drawAll" more than once, which calculates all the frames and the animations of the the nodes all the times, with the probable overhead
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt