----
It isn't entirely solved because I need all my roads and rivers drawn on top of all my areas, and everything else drawn on top of the sea, areas, roads, and rivers. Blindside suggested that I modify the sorting function in CSceneManager to sort certain objects by ID instead of by distance. So, I do have that route.
I also could render things with several drawAll() calls, turning certain nodes visible or invisible as necessary, but that is a bit slow. I could also render individual meshes, but then I need my own culling, transformation, and ray-hit functions.
----
The option to "hack" (as Blindside put it) CSceneManager is the best option for me. But, I guess this will need some maintenance. I do think that what I experienced someone else could have problems with down the road, and custom (or very light) GUIs also need specific and non-(rough)-distance-based, sorting if they are to use drawAll().
----
So... my request/suggestion is that the sorting function be modified to allow for a preset index-based sorting, as opposed to rough distance-based sorting. Here's one way of how I envision it could work:
* Every node would have two extra attributes: call them zIndex (unsigned int) and zIndexSortingEnabled (unsigned byte).
* Currently, there is a node array per render pass, as far as I know. Double these arrays to include nodes with zIndexSortingEnabled equal to 1.
* When IndexSortingEnabled is set, move them to the appropriate array.
* For those arrays where zIndexSortingEnabled is true, sort by the zIndex value instead of by distance.
With this approach, my request/suggestion would be fully implemented, the current rendering speed would not be affected, and nodes would still further be sorted by their render pass type.
----
The one speed hitch is that I don't know how the render pass arrays are implemented. If they are implemented as a simple array (instead of a tree), then setting IndexSortingEnabled for a node would mean having to re-allocate space for the array every time that value changes.
If they are implemented as an array, then it should be made possible to make IndexSortingEnabled set on the node's creation, which could affect many functions.
Perhaps the best solution is to set a global value ("sortNewNodesByIndex"?) that determines whether new nodes are added to the regular distance or the index sorting arrays.