Login  Register

Re: Order of children not necessary respected?

Posted by ThomasR on Mar 05, 2018; 1:54am
URL: https://forum.jogamp.org/Order-of-children-not-necessary-respected-tp4038695p4038702.html

Hi,

gouessej wrote
I fear that the culprit is in your own code, there is no drawing in random order as you can see in the source code:
https://github.com/gouessej/Ardor3D/blob/master/ardor3d-core/src/main/java/com/ardor3d/scenegraph/Node.java#L375
Yeah I was looking at this myself, one thing that concerns me a little (based on my rudimentary understanding of Jogamp Ardor3D) is that Spatial.onDraw seems more of a request than an immediate action to draw something on the canvas?

After some experimentation, I noticed this problem only occurs with textures. For example, Mesh as fill, line or point, renders as expected. Here's what I see with textures:

Based on the order of children this is what I expect:

The wrong order occurs non-deterministically:



How could application code cause a problem that exhibits like this only for textures? I think this is a bug in Ardor3D or an interaction problem with JOGL. I doubt it's JOGL bug, since we can do this in Java3D 1.6. I'm willing to sacrifice some performance to make this work.