[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Problems with depth buffering in JFXPanel
From:       adam () adamish ! com (Adam Granger)
Date:       2011-12-19 9:31:04
Message-ID: ef55dbf2c5e582ce63f1e0d6e938bb6d.squirrel () webmail ! adamish ! com
[Download RAW message or body]

Thanks, I'm fairly sure it is the same issue... I'll update the bug with
these details too.

Attached is my test code that reproduces the problem. It shows 3
rectangles in red, green, blue going "into the page", i.e. with red at
front. The mouse can be dragged up and down to rotate the shape.
This renders correctly as native JFX Application but when in a JFXPanel
the green and blue rectangles "show through" the red rectangle.
The attribute "embedded" controls if the scene is embedded in a JFXPanel
in a JFrame or is "native" JFX Application.

I've reproduced problem on both my work PCs
PC 1: Win XP, with JFX 2.0.1
PC 2: Win 7, with JFX 2.0.2

Console outputs (with -Dprism.verbose=true -Djavafx.verbose=true)

embedded = true for PC 1 (Win XP, with JFX 2.0.1)
===========================
Prism pipeline init order: d3d j2d
Using t2k for text rasterization
Using dirty region optimizations
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
succeeded.
OS Information:
Windows XP build 2600
D3D Driver Information:
NVIDIA Quadro FX 550
\\.\DISPLAY3
Driver nv4_disp.dll, version 6.14.12.7628
Pixel Shader version 3.0
Device : ven_10DE, dev_014D, subsys_034910DE
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
D3DPipeline:getInstance(), d3dEnabled=true
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
EmbeddedStage.setBounds: x=0.0 y=0.0 xSet=false ySet=false w=NaN h=
cw=-1.0 ch=-1.0
EmbeddedStage.setBounds: x=NaN y=NaN xSet=true ySet=true w=-1.0 h= cw=-1.0
ch=-1.0
EmbeddedStage.setBounds: x=0.0 y=0.0 xSet=false ySet=false w=-1.0 h=
cw=300.0 ch=300.0
EmbeddedStage.setBounds: x=NaN y=NaN xSet=true ySet=true w=NaN h= cw=-1.0
ch=-1.0

embedded = false for PC 1 (Win XP, with JFX 2.0.1)
===========================
Prism pipeline init order: d3d j2d
Using t2k for text rasterization
Using dirty region optimizations
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
succeeded.
OS Information:
Windows XP build 2600
D3D Driver Information:
NVIDIA Quadro FX 550
\\.\DISPLAY3
Driver nv4_disp.dll, version 6.14.12.7628
Pixel Shader version 3.0
Device : ven_10DE, dev_014D, subsys_034910DE
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
D3DPipeline:getInstance(), d3dEnabled=true
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
EmbeddedStage.setBounds: x=0.0 y=0.0 xSet=false ySet=false w=NaN h=
cw=-1.0 ch=-1.0
EmbeddedStage.setBounds: x=NaN y=NaN xSet=true ySet=true w=-1.0 h= cw=-1.0
ch=-1.0
EmbeddedStage.setBounds: x=0.0 y=0.0 xSet=false ySet=false w=-1.0 h=
cw=300.0 ch=300.0
EmbeddedStage.setBounds: x=NaN y=NaN xSet=true ySet=true w=NaN h= cw=-1.0
ch=-1.0

embedded = true for PC 2 (Win 7, with JFX 2.0.2)
===========================
Prism pipeline init order: d3d j2d
Using t2k for text rasterization
Using dirty region optimizations
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
succeeded.
OS Information:
Windows 7 build 7601
D3D Driver Information:
NVIDIA GeForce GT 540M
\\.\DISPLAY1
Driver nvd3dum.dll, version 8.17.12.6708
Pixel Shader version 3.0
Device : ven_10DE, dev_0DF4, subsys_849E1043
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
D3DPipeline:getInstance(), d3dEnabled=true
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
EmbeddedStage.setBounds: x=0.0 y=0.0 xSet=false ySet=false w=NaN h=
cw=-1.0 ch=-1.0
EmbeddedStage.setBounds: x=NaN y=NaN xSet=true ySet=true w=-1.0 h= cw=-1.0
ch=-1.0
EmbeddedStage.setBounds: x=0.0 y=0.0 xSet=false ySet=false w=-1.0 h=
cw=300.0 ch=300.0
EmbeddedStage.setBounds: x=NaN y=NaN xSet=true ySet=true w=NaN h= cw=-1.0
ch=-1.0

embedded = false for PC 2 (Win 7, with JFX 2.0.2)
===========================
Prism pipeline init order: d3d j2d
Using t2k for text rasterization
Using dirty region optimizations
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
succeeded.
OS Information:
Windows 7 build 7601
D3D Driver Information:
NVIDIA GeForce GT 540M
\\.\DISPLAY1
Driver nvd3dum.dll, version 8.17.12.6708
Pixel Shader version 3.0
Device : ven_10DE, dev_0DF4, subsys_849E1043
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
D3DPipeline:getInstance(), d3dEnabled=true
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
RESIZE: 5069081476394 w: 300 h: 300

> Hi Adam,
>
> If it is exactly the same issue described in RT-17446, i`ll look into it.
> If not, please file new one.
>
> Thanks
>
>
> On 17.12.2011 13:31, Adam Granger wrote:
>> Greetings.
>>
>> When I embed a 3D scene in a JFXPanel it appears to be rendered without
>> depth-buffering (i.e. things behind show through the front)
>> This seems to be the same issue as this un-answered bug, at least
>> visually the same: http://javafx-jira.kenai.com/browse/RT-17446
>>
>> - I create using the Scene(node, width, height, depthBuffer) constructor
>> using depthBuffer = true.
>> - setDepthTest(DepthTest.ENABLE) is set on all nodes (not sure if
>> necessary but out of desperation)
>> - The _exact_ same scene when used via a subclass of Application renders
>> perfectly
>>      =>  must be something to do with JFXPanel rather than my code / GPU
>> ??
>>
>> - I need to embed in an existing Swing app (JFrame) so using an
>> Application subclass isn't really possible
>> - tried to find the source to debug myself but JFXPanel / Application
>> parts are closed source - so really need from someone on the team :)
>>
>> - seen in jfx 2.0.2 on a windows 7 machine, nVidia...?
>> - tried with the -D verbose options, in both cases d3d pipeline created
>> successfully etc.
>>      * Apologies for lack of detail, this happened at work, and I'm at
>> home for weekend now, I'll get full driver versions on Monday.
>>
>> My questions:
>>   - anyone speculate to cause, or offer a workaround?
>>   - does a scene created via a subclass of Application do something that
>> is fundamentally different to JFXPanel embedding? - perhaps some
>> initialisation is missed.
>>
>> Many thanks to anyone who can help.
>>
>> Adam
>>
>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic