On Mon, Aug 28, 2006 at 08:41:35PM -0700, [EMAIL PROTECTED] wrote:
 > > Also, as Chet pointed out, you don't really need to
 > > to use
 > >   VolatileImages for your sprites, just use regular
 > > BufferedImages (which are managed since 5.0) - you
 > > ou have a
 > > better chance of having them hardware accelerated
 > > ed (that is,
 > > if you stop using getSubImage()), and they require
 > > re much less
 > >   maintenance than VolatileImages.
 >
 > Okay, I tried going back to BufferedImages, but my sprites aren't being 
 > accelerated according to ImageCapabilities.isAccelerated(). I found a page 
 > that says that they wouldn't be accelerated until after a certain number of 
 > copies, but how long is that? I let my program run for a few minutes, and it 
 > continued to tell me that they weren't being accelerated.
 >

  They typically get accelerated after a couple of copies.

  Most likely your sprites aren't being accelerated because they are
  translucent as opposed to bitmask. As suggested, you should either
  change them to gifs, or after loading, copy them to an image created
  with
  GraphicsConfiguration.createCompatibleImage(w,h,Transparency.BITMASK) .

  Also, you can try running your appliation with -Dsun.java2d.d3d=true
  (which enables the non-default Direct3D pipeline) or
  -Dsun.java2d.opengl=true and see if it makes any difference.

  Also, I'm assuming you got rid of getSubImage(), that will also stop
  the image from being accelerated.

 > Also, I installed the new JDK6 beta and tried it out with my program. 
 > Interestingly, when I still had my sprites as VolatileImages, I had greatly 
 > reduced speed. When I moved them back to BufferedImages, the speed returned, 
 > though not fully. My peak FPS with the JDK6 was about 185 and with the JDK5 
 > it was about 200. Anyway, I suppose it's not a big deal, but I thought that 
 > Java was supposed to get faster with each version.

  Can't think of anything that would cause this.

  Thanks,
    Dmitri

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to