Drawing Qt3D objects in the right order depending on current camera view
I have a small Qt3D view with a button on the side that will draw some Cuboids when pressed. What I have noticed is that if I rotate my camera view and re-draw them, then the surfaces will not go through a depth test and will usually be drawn in the wrong order. An example can be shown here:
This View looked from the top:
Seen from the side (and even if the polygons are generated while looking from the side) is shown like this
Which is wrong since the shape on the right should be shown first.
I have tried fooling around with the class QDepthTest but with no luck. Any suggestions or tips ? Thanks in advance.
No hints ? :)