Hello.
We are a group of people having problems with the DisplayRegion render order. The objective was to set a specific order in which various orthographic views were rendered together with perspective views.
The documentation is straight forward, so it the source code comments, but the reality is that the sorting does not work as advertised. In the examples we had something like this:
bgcam1.getDisplayRegion(0).setSort(0)
bgcam2.getDisplayRegion(0).setSort(1)
base.cam.node().getDisplayRegion(0).setSort(2)
fgcam.getDisplayRegion(0).setSort(3)
According to the documentation (and common sense/logic) this would render in the following order: bgcam1, bgcam2, base.cam and finally fgcam. That does not occur in reality.
You can follow the thread in https://discourse.panda3d.org/viewtopic.php?t=2245 for more detailed examples.
I tried auditing the source code to understand why the render order defies both the documentation and logic. It seems like TotalDisplayRegions is like any ordinary vector, but I’m not a compentent C++ programmer and I have not found the code that actualy sorts that vector.
We currently need someone who is skilled with C++ to provide us with an explanation how the render order REALLY works -or- can confirm that we have indeed found a bug.
I’m posting here in hope that someone who knows Panda3D on a lower level will reply.
Thanks in advance!