Assume a tree of objects that need to be rendered, each with their own x/y coordinates.
Now let's say I could crawl through the tree and give each element a "z" coordinate, before rendering.
Is there a technique to allow the tree to be rendered out-of-order, yet still have the appropriate layering?
In other words, it makes no difference whether parent is drawn before child, or child before parent, the parent will always be drawn before the child (or the other way around, but it will be consistent).
I'm just getting started with WebGL, but I'm thinking that with some sort of orthographic projection, this would work?