Drawing Qt3D objects in the right order depending on current camera view
-
Hello,
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:
https://www.dropbox.com/s/xqc50u9w7c71q8a/Workspaces_issue_1.jpg?dl=0
Seen from the side (and even if the polygons are generated while looking from the side) is shown like this
https://www.dropbox.com/s/r24cn4vwopz5w0c/Workspaces_issue_2.jpg?dl=0
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.