If you look at the J3DRenderer class that
is available as part of the JMF-Java3D example
on the JMF website, they have a lot of extra
code to determine the image parameters for
the different platforms-this class only supports
byRef for windows and solaris-

A couple questions:

Why does J3D need to make a copy in some cases
and not in others?  Would it be possible to have
a single format that is gauranteed supported
byRef on all platforms?

Is there any way to query to see if you are
getting the extra copy?  That would make a nice
debugging feature at least.

Thanks--

Alex


-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Mark Powell
Sent: Wednesday, January 02, 2002 6:32 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] texture by reference on Linux


Questions about texture-by-reference:

The attached reply answered some questions about when copies of the
image are and aren't made when applying a texture map onto geometry
for Windows/OpenGL and Solaris/OpenGL. Which of them, if any, holds
true for RedHat Linux 7.1 and up?

Also, when it refers to BufferedImages of type TYPE_CUSTOM and the
form 4BYTE_RGBA or the form 3BYTE_RGB, what does that mean?  Does it
mean that I have to construct a BufferedImage of TYPE_CUSTOM and the
underlying DataBuffer has to have the form listed there?  If not, how
do you ensure that the BufferedImage has the proper "form"?

Also, for my specific case (Redhat 7.1), when I load a JPEG file using
a JAI "fileload" op, and call getAsBufferedImage(), I get a
BufferedImage of type TYPE_3BYTE_BGR.  If I construct an
ImageComponent2D with byReference and yUp set to true, what
ImageComponent2D format should I use to ensure that no copy of the
image is made?

Also, under what circumstances does a copy of the image get made (or
not get made) when you supply a JAI RenderedOp to the ImageComponent2D
using that method that takes a RenderedImage?

Thanks,
Mark Powell
Jet Propulsion Laboratory

>Date:         Fri, 27 Oct 2000 09:42:20 -0700
>Reply-To:     Uma Sabada <[EMAIL PROTECTED]>
>Sender:       Discussion list for Java 3D API
<[EMAIL PROTECTED]>
>From:         Uma Sabada <[EMAIL PROTECTED]>
>Subject:      Re: ImageComponent2D question.
>Content-Type: TEXT/plain; charset=us-ascii
>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

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