Fellas…
I’ve got a little video game and
i was facing some speed issues in high
resolutions so i thought: “why not?let’s
find out what this volatileImage stuff is all about”
The situation is the following:
Container->Canvas
BufferedImages drawing in
Buffer (BufferedImage) and then the buffer is being
drawn to the Graphics of the Canvas using
Graphics2D’s drawImage.
I knew nothing about VolatileImage so i started changing
everything i saw from BufferedImage to VolatileImage using
routines for validate() cases and contentsLost() (std procedure…)
The Result? Disastrous…(fps down 3-4 frames)
OK i have understood the redundancy of using VolatileImages
for the initial images but what about the final Buffer?
I mean it’s the image(array of bytes)that should stay in the VRAM…
So,I did it again with only the final buffer being Volatile
but the results were the same.
Tell me:
Do i have a really BIG misconseption about what a
VolatileImage is and how to use it?
Does the above structure has any potential of becoming
any faster without any big changes (e.g BufferStrategy)?
I don’t want so much a solution to my problem
comparably to how badly i want to find out
if i got straight VolatileImage.