OnscreenImage Depth: by value or by draw order?

Using render 2D or 2Dp…

According to the Manual, if you have two onscreen image nodes, ImgA and ImgB, depth is based on positive values on bottom and negative values on top (or the greater negative value on top).

So, if ImgA gets a -5 and ImgB gets a -12 for depth values… ImgB should appear on top of ImgA.

This does happen, but…

What I’m experiencing is this…

Even if ImgB should appear on top of ImgA, it will NOT appear on top if I draw it first and then draw ImgA last.

:question:

That’s a depth conflict… Two different kinds of depth ordering is going on. It’s a little too much to manage when you get into which image is drawn in what order. 10 times out of 10 I am not going to draw images in order but will rely on the depth value to set things straight.

What’s going on?

p3d 1.7.1

Try calling:

render2d.setDepthTest(True)
render2d.setDepthWrite(True)

The writing and testing of the depth buffer is usually disabled for render2d, because most GUI’s don’t require or expect that behavior.

David

That worked with a give an take manner. Onscreen Image nodes aligned according to depth, but all text nodes reparented to image nodes, fall behind all image nodes.

So I’m probably better off going with out SDT and SDW true and just find a work around for the one flawed GUI part.

My freeware project is like 90% complete. Issues like this continue to waste time for me.