> Date:         Thu, 20 Feb 2003 16:33:37 -0800
> From: Mark Hood <[EMAIL PROTECTED]>
>
> 2) Setting the view platform transform in preRender() may be problematic.

I've confirmed that this is the problem.

Even though you're updating all your objects and the view platform in
the same Renderer thread (through the preRender()) call, that thread is
potentially running concurrently with the behavior and structure update
threads.  Each update to a transform generates a message to the thread
that manages the internal structure of the scene graph.

If you were running your update code in a Behavior thread, then all
those internal messages for the transform updates would be collected and
guaranteed to take effect in the same frame.  The structure update would
not begin on the next frame until the behavior finished executing.  But
since they're coming from the Renderer thread, it's possible that some
of the later messages will miss the beginning of the structure update
and actually take effect in a different frame.  This all depends upon
how the threads are scheduled by the JVM and the time it takes for each
thread to do its work.

The Behavior and Renderer threads run concurrently for performance.
However, we can't recommend setting the j3d.threadLimit property to 1
since deadlocks have been reported with this setting.  One such open bug
is:

  4299480 - readRaster() and waitForOffScreenRendering() will not work if
            threadLimit=1

Your best bet is to use a Behavior to synchronize your transform updates
to the same frame.

-- Mark Hood

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to