Have a look at the date on that article! That was published before Java 5 was 
released. Back in JDK1.4 then only certain API calls resulted in the resulting 
images being managed. As of Java 5 all types of BufferedImages are managed. 
Calling the BufferedImage constructor directly or using one obtained through 
ImageIO or GraphicsConfiguration will return a managed image. Google for the 
term for precise details. In a nutshell, once the image has been copied from (1 
by default) a few times, it is cached in VRAM if enough memory is available, 
hence accelerated. However, each time you modify it by drawing to it with its 
Graphics object or by calling setRGB or some other mutating method, then the 
cached version is flushed and won't be re-accelerated until you've copied FROM 
it a couple of times. Thus, drawing TO the image is never accelerated.

Further, if you try and grab the image data directly by calling getDataBuffer() 
on the Raster, then it will be permanently unaccelerated so if you want to make 
changes to the image, then stick with Graphics calls.

If you require full acceleration of rendering to and from the image look at 
BufferStrategy and VolatileImage, though in most cases managed images are 
sufficient.
[Message sent by forum member 'fred34' (fred34)]

http://forums.java.net/jive/thread.jspa?messageID=295590

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