One option is to do all of your updates in a behavior, which garuntees that
the updates are applied in the next frame. There are some gotcha's to this,
such as Appearance updates taking one frame and geometry updates taking 2.
I would suggest using a behavior to force 2 frame updates before any
capture. This can be done with a WakeOnElapsedFrames condition.
Sent: Sunday, August 29, 2004 6:25 AM
Subject: [JAVA3D-INTEREST] Scene updates
In my code I'm applying modifications to the Appearance and/or the
transforms of various objects in a scene through a Swing gui.
The scene is attached to an offscreen Canvas which I use to take snapshots
of the scene.
Probably due to the asynchronous design of Java3D (or maybe it's my
mistake), quite often I do not get my snapshots up-to-date with the params I
set with the gui.
Is there a way to wait for the completion of the scene updates before taking
a snapshot ?
[Message sent by forum member 'MikOfClassX' (MikOfClassX)]
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Thanks for the hint Mike.
Anyway I would say that all my scene synch troubles vanished automagically by adding the following line to the scenegraph construction:
I also set the priority of java3d to 1:
Now everything works very well. Do not ask me how it can be possible. It is most likely an issue of Java3D when it renders offscreen.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.