When I sayed, that I have uploaded the changes in this posting, I was talking about some cleanup and the layered flag. So the only thing that needs to be changes is like #239 in MultiPassView to always pass “false” to the method and it’s done.
The layered flag shouldn’t be passed to every call of renderOnce, but should be a flag of the View class, as it is now. And you would break compatiplity if you just add an additional parameter to any renderOnce method. So I would suggest to only modify this line #239 in MultiPassView and leave the rest as is. Is this OK?
Well, if the only effort of the multipass view in non layered mode is to render one block of nodes after another, you can simply put them in an OrderedGroup. So when I have integrated the MultiPass feature directly into the internal rendering code, which is much faster, you’ll need a layered flag. But so far, it is not needed, I think. Or am I wrong?
I have just committed the changes… before reading this post check it out.
I changed your last version, so it should meet your expectations One thing I noticed is, that you included the buffer swapping into the if(isLayered) constraint, which I suspect was wrong. As I understand it, the should disable buffer swapping until all passes are rendered, so it is needed in any case.
I have also changed the MultipassTest a little, so you can switch layered mode on and off pressing L.
Don’t know. I am just not comfortable in changing others code without leaving a way to get the old behaviour back. There might be use cases like e.g. stencil shadows to leave the depth buffer intact… but I haven’t thought this through.