Ok, let me also ask this: when i modify the imagebuffer which i got from
one image component and then assign to anothe imagecomponent, isn't memory
allocated for the imagebuffer? if so, then it is pointless for me to
implement this "double buffering" which i was hoping to use to relieve the
need of allocating memory for every texture change. Isn't there a way to
change a texture and not allocate more memory, where i only need to change
one pixel or two pixels in the texture image?

nader



On Wed, 28 Mar 2001 12:11:55 -0800, Charmaine Lee <[EMAIL PROTECTED]> wrote:

>Nader,
>
>
>Nader,
>
>>
>> pixels =
>> ((DataBufferInt)((ImageComponent2D)textureArrayCurrent[i][j].getImage(0))
>>                  .getImage().getRaster().getDataBuffer()).getBankData();
>>
>        Pixel changes here will not be reflected to the texture.
>        Note, when you do ImageComponent2D.set(bufferedImage),
>        the bufferedImage data is copied into the ImageComponent2D object.
>        The subsequent changes to the bufferedImage object will not be
>        automatically reflected to the ImageComponent object and hence
>        not reflected to the texture.
>
>        What you can do is to double buffer the ImageComponent
>        object, modify the buffered image data, set the buffered image data
>        to the back ImageComponent object, and then set the texture
>        image to the back ImageComponent object.
>
>
>
>
>Charmaine Lee
>Java3D Engineering 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