JDK-8113195 : OpenGL : We need proper Z-Buffer managment for transparent and off-screen rendering
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-06-01
  • Updated: 2015-06-16
  • Resolved: 2012-01-04
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.1Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Duplicate :  
Description
ES2Graphics.java has a code peventing Z-buffer from be cleared it RenderTarget is not a SwapChain : 

        // TODO: only bother clearing the depth buffer for onscreen
        // windows for now, since we do not yet attach a depth buffer
        // to FBOs; this will need to change, obviously...
        boolean clearDepth =
            isDepthBuffer() && getRenderTarget() instanceof ES2SwapChain; 

Z-buffer should be functional even for render target textures and off-screen rendering.
Comments
Verified that this is fixed.
27-03-2012

Fixed. Changeset: b91300323ef3 Author: Chien Yang <chien.yang@oracle.com> Date: Wed Jan 04 14:31:04 2012 -0800 URL: http://jfxsrc.us.oracle.com/javafx/2.1/scrum/graphics/rt-closed/rev/b91300323ef3
04-01-2012

Approved at deferral review meeting on 8/10/11
10-08-2011

SQE: ok to defer
04-08-2011

In addition to the code identified in the description, we need similar changes in ES2Context.java. We also need to attach a depthBuffer to an off-screen surface (FBO) in ES2RTTexture.java.
01-06-2011

RT-13233 shows similar issues for D3D
01-06-2011