From: "Kasparian, Raffi J." <[EMAIL PROTECTED]>
> I'm trying to take advantage of byReference and yUp in ImageComponent2D to
> create a texture that I can draw quickly onto. The texture should act like
a
> background picture over which I draw circles, lines, squares etc. It's
> important that the texture update quickly because the drawing occurs every
> frame to create an animation on the surface of a Shape3D. I have tried to
> follow the instructions in the API but haven't noticed any difference in
> speed whether or not byReference and yUp are true or false (Bug?). When
the
> background texture is large (1024 X 1024) the drawing process just takes
too
> long to be effective for animation.

I tried byReference and yUp and didn't got no speed difference too. (jdk1.3,
j3d 1.2, win2000, SGI320).

>
> Does someone have a better idea for how I could implement my idea? For
> instance, is there a way to avoid the calls to ImageComponent2D.set() and
> Texture.setImage() and just draw to the image directly?
>
A few days ago ShuangYing (Sharon) Huang from Sun pointed me to a very good
method to update the DataBuffer inside a BufferedImage very fast:
Accessing BufferedImage with
  int[] intData =
((DataBufferInt)bimg.getRaster().getDataBuffer()).getData();
is 10 times faster then BufferedImage.setRGB(..).

Hope that helps,
Marco.

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