Hi,
I’ve been programming Java Game for 6 months now, building a Java Game framework for my thesis. The information on this board has been a big help. First time, I’ve posted thought, so I hope I don’t raise a common issue.
I was wondering if there is a way to retrieve the content of a bufferstrategy. Let me explain myself.
I’m currently using a bufferstrategy(2) on a JFrame. Once I’ve drawn everything I need, before calling show(), i would like to be able to copy the content of the backbuffer to a BufferedImage. This allow me to:
- Cache parts of the image. This cache could be useful for the next render, or a any other render.
- Save the buffered image to a file. Thus, it would give me an efficient screenshot (recording?) engine.
Right now, I now that I can save the content of the window using the Robot class. However, this seems very inefficient. Any ideas?
Thanks for the help,
Firebane