This is what I guess, give it a try -
 
In the Canvas3D class there is a method called postSwap() which gets called in the rendering loop. Whenever you change some ColoringAttribute associated with a raster/texture, it will be in effect when the postSwap() gets called after your change. So if you can make sure that you dump the jpeg image after postSwap() gets called, it should behave properly. For this you can extend a class from Canvas3D , over write the postSwap()  and use some boolean in your class to control.
 
thanks
anirban
----- Original Message -----
Sent: Wednesday, September 11, 2002 6:02 PM
Subject: [JAVA3D] Changing text color on Canvas3D during rendering

Hi,

I have an application which renders a 2D CAD graphics image on a Canvas3D. I have extended the Shape3D and used Texture2D for drawing legend text on the Canvas3D for legends etc.

I need to change to color of the legend text at runtime while rendering the Canvas3D and exporting the image as a JPEG file. However, when i change the color of the text, it does not get reflected immediately and the JPEG image still contains the previous text color. The text color gets changed after the rendering is over. What could be wrong here?

Thanks
Raghav

Reply via email to