Problems with depth buffering in JFXPanel

Adam Granger adam at adamish.com
Sat Dec 17 01:31:58 PST 2011


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



More information about the openjfx-dev mailing list