MRe Guest
|
Posted: Fri Jan 26, 2007 12:31 am Post subject: direct memory access to backbuffer |
|
|
Hi,
I have a JFrame using double-buffering (createBufferStrategy(..)) and was
wondering if it's possible to get direct access to the backbuffer's memory?
The only thing I seem to be able to get is a Graphics object,
(frame.getBufferStrategy().getDrawGraphics() and don't know how to get the
component it's writing on
I'd hope to be able to do like the following, except where 'image' is
replaced with something returned from getBufferStrategy(), in some way
BufferedImage image = new BufferedImage(10, 10,
BufferedImage.TYPE_INT_ARGB);
int[] d = ((DataBufferInt)image.getRaster().getDataBuffer()).getData();
Thank you kindly,
Eliott |
|