Search code examples
javagraphicsramcopying

Copying a Portion of Graphics Memory to RAM Java


I'm trying to get a portion of the Graphics Memory, and copy what is on it to normal RAM. Is there a possible way to do this with Java? I've searched around a bit, but to no avail. Also, I would assume it depends on your GPU / Chipset, so how would you detect that as well?


Solution

  • You can Use JNA to make method calls to shared libraries.

    You can use Unsafe.copyMemory to copy memory from one place to another, or to an object. Note: it is unsafe in the sense that memcpy is unsafe. ;)