Java: VolatileImage is slower than BufferedImage

I am making a game in java and am using BufferedImages to display content on the screen. I had performance issues on low speed machines where the game was supposed to run, so I switched to VolatileImage, which is usually faster. Except that they actually slow it all down.

Images are created using GraphicsConfiguration.createCompatibleVolatileImage (...) and drawn on the screen using Graphics.drawImage (...) (click on the link to find out which one). They are painted on canvas using double buffering.

Does anyone have any idea what is going wrong here?

+5
source share
1 answer

Most likely, your code mixes accelerated and non-accelerated operations.

This document must be read. Section 3.2 is especially needed for those who work with Java accelerated graphics.

+6
source

All Articles