Matti:

        Yes, currently there is a bug where one needs to do a getImage() when
using byReference during offScreen rendering and readRaster. This bug will be
fixed for 1.2.1 Beta.


        Could you please send us a test program for the exception that you are
getting with BufferedImage.TYPE_BYTE_GRAY/FORMAT_CHANNEL8?

        Note also that there is a byReference bug with BGR on windows where a
unnecessary copy is being made. This bug will also be fixed in 1.2.1 Beta.


-Uma
Java3D Team


> X-Sender: mhietaj@tk8
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8BIT
> Date: Wed, 21 Jun 2000 18:53:12 +0300
> From: Matti Hietajarvi <[EMAIL PROTECTED]>
> Subject: [JAVA3D]
> To: [EMAIL PROTECTED]
>
>  Hi,
>
>  I'm trying to off-screen render into a BufferedImage, which is passed to
> Canvas3D's off-screen buffer (ImageComponent2D) by reference.
>
>  For some reason I have to make a call to
> ImageComponent2D.getImage() (I don't need the return value) after rendering
> is completed to get anything displayed on the BufferedImage. If I don't
> make that call, BufferedImage stays black! That call also takes very
> long time to finish (200 ms), considering that the size of the image is
> only 256x128. (SPARC Ultra1)
>
> ImageComponent2D has FORMAT_RGB and BufferedImage TYPE_INT_BGR.
>
>  Thanks for any comments/help.
>
>  -- Matti Hietajärvi
>
 X-Sender: mhietaj@tk8
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8BIT
> Date: Wed, 21 Jun 2000 20:29:35 +0300
> From: Matti Hietajarvi <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Off-screen rendering: buffers & conversions
> To: [EMAIL PROTECTED]
>
>  Hi,
>
>  Referring to my last posting (empty subject field, sorry):
>
>  I read the mail about type/format combinations which shouldn't cause
> excess copying/conversions (for textures), and tried changing type/format
> in my off-screen rendering code to:
>
>   b = BufferedImage(256, 256, BufferedImage.TYPE_BYTE_GRAY);
>   i = ImageComponent2D(ImageComponent2D.FORMAT_CHANNEL8, b, true, true);
>
>  And got:
>
> Exception occurred during event
> dispatching: java.lang.ArrayIndexOutOfBoundsException: 65539
>         at
javax.media.j3d.ImageComponentRetained.copyBufferedImageWithFormatConversion(Com
piled
> Code)
>         at
javax.media.j3d.ImageComponent2DRetained.getImage(ImageComponent2DRetained.java:
397)
>         at
javax.media.j3d.ImageComponent2D.getImage(ImageComponent2D.java:264)
>
>
> Where again getImage call is there because otherwise BufferedImage ends up
> being all black...
>
>  Then I changed type/format to TYPE_4BYTE_ABGR/FORMAT_RGBA8 and all worked
> fine. (except that getImage is still needed)
>
>  Based on these examples, it seems that by reference flag doesn't work at
> all for off-screen rendering?
>
>
>  -- Matti Hietajärvi
>
> ===========================================================================

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