Matthew:
Not all matching formats are retained as "by-ref" in the
implementation. Here are the combinations for which a copy will NOT be
made.
- Texture by reference and Y-up
Using texture by reference and Y-up format may reduce the
memory needed to store a texture object, since Java 3D avoids
creating a copy in some cases. Currently, Java3D will not
make a copy of texture image for the following combinations of
BufferedImage format and ImageComponent format (byReference
and Yup should both be set to true):
On both Solaris and Win32 OpenGL:
BufferedImage.TYPE_CUSTOM ImageComponent.FORMAT_RGB8 or
of form 3BYTE_RGB ImageComponent.FORMAT_RGB
BufferedImage.TYPE_CUSTOM ImageComponent.FORMAT_RGBA8 or
of form 4BYTE_RGBA ImageComponent.FORMAT_RGBA
BufferedImage.TYPE_BYTE_GRAY ImageComponent.FORMAT_CHANNEL8
On Win32/OpenGL:
BufferedImage format ImageComponentFormat
---------------------- ----------------------
BufferedImage.TYPE_3BYTE_BGR ImageComponent.FORMAT_RGB8 or
ImageComponent.FORMAT_RGB
On Solaris/OpenGL:
BufferedImage format ImageComponentFormat
---------------------- ----------------------
BufferedImage.TYPE_4BYTE_ABGR ImageComponent.FORMAT_RGBA8 or
ImageComponent.FORMAT_RGBA
-Uma
Java3D Team
> MIME-Version: 1.0
> Date: Fri, 27 Oct 2000 09:11:15 -0700
> From: Matthew Huber <[EMAIL PROTECTED]>
> Subject: [JAVA3D] ImageComponent2D question.
> To: [EMAIL PROTECTED]
>
> Hello,
>
> I'm setting a Background node with a BufferedImage, but I need to modify
that image on the fly depending on user input. Since the scene graph is
live, every time I need to update the image I am creating a new
ImageComponent2D (if there's a way around it I haven't tried I would love
to know). The problem is that creating the ImageComponent is very slow,
approx. 200ms. There is an flag to pass the image into the component by
reference, but either this is not working or is just as slow as copying
the whole image in. I've set the yUp flag true as well (as indicated in
the documentation) and I've tried to match the image formats
(BufferedImage.TYPE_INT_RGB and ImageComponent.FORMAT_RGB) but it's still
not cooperating.
>
> Any insights on this (or maybe the source for ImageComponent2D so I can
figure out why it's moving so slowly) would be welcome.
>
> Thanks,
>
> Matthew Huber
>
>
==========================================================================
=
> 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".