|
Replies:
2
-
Last Post:
Jul 10, 2008 2:53 AM
by: Ken Warner
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
What is the proper way to compare drawing a BufferedImage and drawing an Image with BufferStrategy?
Posted:
Jul 9, 2008 5:03 AM
|
|
|
In a test applet, I can draw a BufferedImage or an Image using BufferStrategy. Drawing with BufferStrategy is more than 3 times faster than just a straight drawImage() with a BufferedImage.
Am I doing a proper comparison? I thought BufferedImage's did all the acceleration for you. Or was that just the double buffering? What is a more true way to compare the drawing?
Here's the paint() method:
public void paint(Graphics g) { // System.err.println("paint()"); try { if(!this.isShowing())return; g.drawImage(bufferedImage,0,0,thisW,thisH,this);
// do { // do { // bg = (Graphics2D)bs.getDrawGraphics(); // bg.drawImage(canvasImage, 0, 0, thisW, thisH, this); // bg.dispose(); // } while (bs.contentsRestored()); // bs.show(); // } while (bs.contentsLost()); } catch (Exception ie) { ie.printStackTrace(); } }
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".
|
|
|
|
|
|
|
|
|
Re: [JAVA2D] What is the proper way to compare drawing a BufferedImage and drawing an Image with BufferStrategy?
Posted:
Jul 10, 2008 2:53 AM
in response to: linuxhippy
|
|
|
Thanks but that's really old stuff. And I don't think much of what is promised has happened. If you look at my applet, BufferedImage's draw slower than plain old Image's.
BufferStrategy is a fairly good interface for VolatileImage's with some glitches showing up on full speed rendering loops.
Seems to me that a lot more could be done now. Graphics cards are available with lots'o'vram these days. Thanks to the gamers.
I just don't see BufferedImages as a real perfomance gainer....
java2d@JAVADESKTOP.ORG wrote: > Don't know if you know Chet Haase's Blog entry about buffered images: > http://weblogs.java.net/blog/chet/archive/2003/08/bufferedimage_a_1.html > > lg Clemens > [Message sent by forum member 'linuxhippy' (linuxhippy)] > > http://forums.java.net/jive/thread.jspa?messageID=285580 > > =========================================================================== > To unsubscribe, send email to listserv@java.sun.com and include in the body > of the message "signoff JAVA2D-INTEREST". For general help, send email to > listserv@java.sun.com and include in the body of the message "help". >
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".
|
|
|
|
|