Rename Node Strength in JavaFx

I am working with the new JavaFx 3D api interface. JavaFx 8 introduced a sub-session node, which contains its own scene graph and can simultaneously appear as a node in the scene. This allows you to visualize 3D nodes using a perspective camera inside a subsection when rendering HUD nodes at the top of orthogonality. This works fine until you try to move the HUD components. If the nodes within the subnet are not moved, JavaFx will not redraw it. Thus, it simply leaves black artifacts where the HUD used to be. Is there a way to make the subnet redraw?

EDIT: One of the ways I was able to fix this problem is to display a cube from a screen that rotates endlessly. Since it always rotates, the subnet is always updated. This seems like a funny way to fix it, but it's the best I can do now. Still looking for the best solutions ...

+5
source share
1 answer

Node.setCache (boolean) will do the job and clear your black artifacts after moving the HUD components. Use Caching with a cache hint . For example, before you start moving, you set the SPEED cache hint. When you finish with the animation, you return to QUALITY , it will re-render your Node (for example, repaint () in swing)

0
source

Source: https://habr.com/ru/post/1205061/


All Articles