Because the or'ed combination of all enabled flags is not an enum anymore. I didn't review the patch so far, but I'm also not sure if I want to change the drawAll signature. I see that it's much simpler this way, but I have to check the other methods around there to see if it fits, or if we just use the mode settings.
Probably not appropriate here, but I think the drawAll routine should be reworked. Someone has poked around in it to enable "light manager" capabilities, but you can't do forward rendering with it. With everyone talking about shaders, this seems to be a major problem. Now I know many people do forward and deferred rendering in Irrlicht, but, really, that's not what is going on is it? Everyone is coding around the rendering loop.
I say that the one thing that should be supported is forward rendering. And it's not.
Well, I guess that the above topic is basically solved, so just propose your ideas here. What is wrong or should be enhanced?. Just mind that the light manager is just wrongly named, it's a pre-render callback not necessarily tied to lights
You can call drawAll without parameters and it works just like before (i made sure to try). So it shouldn't be a problem to change the function signature.
Ack from me. I would have used enable instead of disable, and there's some unnecessary work still done for each skipped pass (placing the ifs before each section would remove that work), but it looks good as is.
The ifs before each section? I don't understand what you mean. I tried placing them at the top, but they had to be called after OnRegisterSceneNode for it to work. I'll look at my code again and see what you mean.
I meant that the nodes still get OnRegisterSceneNode called, and end up registering for no reason. You think that it should take which render states to enable? I guess that would be more intuitive. I'll change it if I get a chance later today.
On OnRegister, OnAnimate:
That also happens with your patch? Also, it's not something we can prevent, as we can't tell in advance whether a mesh is solid etc.
Though I see with this approach the set_used(0) calls will have to be moved to the end, outside of the blocks.