5

I've been working with the new JavaFx 3D api. JavaFx 8 introduced the subscene node, which contains its own scene graph and can simultaneously be rendered as a node in a scene. This allows you to render 3D nodes with a perspective camera within the subscene while rendering the HUD nodes on top orthogonaly. This works fine until you try and move HUD components. If the nodes within the subscene have not moved, JavaFx will not redraw it. So it just leaves black artifacts where the HUD used to be. Is there some way to force the subscene to be redrawn?

EDIT: One way I've managed to fix the problem is rendering a cube off screen that spins indefinitely. Because it is always spinning, the subscene is always being updated. This seems like a ridiculous way to fix it but it is the best I can do for now. Still looking for better solutions...

Joshua Dotson
  • 135
  • 1
  • 8
  • Create an [MCVE](http://stackoverflow.com/help/mcve) and log it in [a bug report](https://wiki.openjdk.java.net/display/OpenJFX/Submitting+a+Bug+Report) with your environment information. – jewelsea Oct 20 '14 at 17:43

1 Answers1

0

Node.setCache(boolean) will do the job and will clear your black artifacts after move HUD components. use Caching with the Cache hints , For example before you start moving, you set the cache hint to SPEED Once you are done with Animation you switch back to QUALITY , it will re-render your Node (like repaint() in swing)

Akila
  • 1,258
  • 2
  • 16
  • 25