JDK-8099419 : Add Z depth sorting (Z-buffering) to JavaFX
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx1.2
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2009-03-10
  • Updated: 2015-06-16
  • Resolved: 2011-03-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
fx2.0Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Relates :  
Description
1) We need to add Z-buffering to JavaFX for sorting objects by depth when using 3D transforms.

May consider adding the ability to enable Z-buffer on Node. This will allow the support of underlay, overlay and depth sorted rendering. 

2) Resolve semantics of mixing Z depth sorting with rendering order.

The current "depth" order for 2D objects is a strict painters algorithm where the last thing rendered ends up on top. There are scene graph operations to send a node to the front or back of the Z stack by moving it to the end or beginning of the rendering order. We need to rationalize this with 3D depth sorting (e.g., with a Z-buffer), taking into account transparency.

Comments
http://jfxsrc.us.oracle.com/javafx/presidio/scrum/graphics/runtime/rev/4925668815c4
21-03-2011

Updated webrev with latest merge, javadoc updates, and test changes. http://beethoven.us.oracle.com/webrev/javafx/rt-3578-v2/
21-03-2011

Here is the webrev: http://beethoven.us.oracle.com/webrev/javafx/rt-3578/
18-03-2011

Proposed API [updated 4-Mar-2011]: Node.java: Indicates whether depth testing is used when rendering this node. If the depthTest flag is false, then depth testing is disabled for this node and all of its descendents. If the depthTest flag is true, then depth testing is enabled for this node if the following conditions are also met: * The depthBuffer flag for the Window is true (meaning that the Window has an associated depth buffer) * The depthTest flag for each ancestor node in the scene graph is true @GenerateProperty private boolean depthTest = true; Window.java: Specifies whether a depth buffer is created for this window (immutable after window is visible). @GenerateProperty private boolean depthBuffer = false;
04-03-2011

A partial fix for this was checked in to allow depth test (z buffer) to be enabled on system property: -Dprism.depthtest=true Changeset: http://jfxsrc.sfbay.sun.com/javafx/presidio/scrum/graphics/runtime/rev/a76e57aab2db
18-08-2010

We have decided to defer this until a post-soma release when we will also address 3D primitives.
25-08-2009