Hi Jeremy,
I am working on a similar application, where I want to
display animated textures on Shape3D objects. In the
beginning I was using new ImageComponent and Texture
objects for every new texture. But, since Java3d classes
can not be cleaned-up, I was eventually running out of memory.
My new solution is to construct only on of those objects
in the beginning and reuse them. For the ImageComponent
object you can use the set(BufferedImage buf) and for the
Texture the setImage(int level, ImageComponent image).
Of cource, the Texture Object should not be part of the live
scene. So, you have to set the texture of the appearance
either to null or to another value, before you modify those objects.
The problem with this solution is that after some time
of random duration, the application freezes. The problem is
probably the Appearance object. I made some tests where I
was simply setting the texture of the Appearance object and
it was also freezing after a number of times (usually after 10000 to
20000 times). There is a posibility that this is a bug of Java3D.
Please let me know if you use this solution, if you face the
same problems.
Best regards,
Vasilios Darlagiannis
Jeremy Smoler wrote:
> Sorry if this is repetitive, I posted it a couple of weeks ago and
> didn't get an answer:
>
> Is there a faster / more efficient way to do animated textures than to
> create new ImageComponent and Texture objects every time a texture image
> changes? I can't find any documentation that says Java 3D does / doesn't
> support animated textures.
>
> -Jeremy Smoler
>
> ===========================================================================
> 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".