> I know that Scenegraph updations
> and Renderer threads are parallel and i have ensured that the JPEG image
> is captured with a delay of one frame in the postSwap of the extended
> Canvas3D object. The color change updations are very inconsistent.

Does this mean that after you update the color in the scenegraph, you wait
for a frame and then dump the image in the postSwap()? We follow a simple
step to achive something similar.

try these steps -

1.add two boolean members to extended Canvas3D class. say "preBool" and
"postBool".  default to false.
2. update color in the scene graph. and set preBool to true.
3. in preRender() if preBool is true then set postBool as true.
4. in postRender() if postBool is true, then dump the jpeg.

One thing that can be missing in your case is a call to preRender() in
between your editing operation and postRender() call since they are
happening in different threads. This will ensure that preRender() is called
in between and your change has been realized by renderer thread.

This works quite well in our case.

thanks
anirban



----- Original Message -----
From: "Raghavendra R" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 3:08 PM
Subject: [JAVA3D] Scenegraph and renderer updations


> Hi,
>
> I want to know how to ensure Scenegraph updations get reflected in
> Renderer consistently. I have a Java3D code which consists of a
> Scenegraph with many Branchgroups (in turn having GeometryArrays, Morphs
> etc) depicting an FE mesh. I need to change the color of one particular
> Morph containing an array of Geometry arrays before taking a JPEG image
> of the same thro' the postSwap in Renderer.
>
> My problem is that, the color changes to the GeometryArrays do not
> always get reflected in the JPEG image. I know that Scenegraph updations
> and Renderer threads are parallel and i have ensured that the JPEG image
> is captured with a delay of one frame in the postSwap of the extended
> Canvas3D object. The color change updations are very inconsistent.
>
> How do i ensure that the Renderer and hence the JPEG image shows the
> correct and all the latest updations (color, geometry etc) to the
> Scenegraph? Any info will be greatly appreciated.
>
> Thanks in advance,
> Raghav
>
>
===========================================================================
> 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".

===========================================================================
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