Re: Questions about PBuffers
Posted by Gene on Dec 13, 2011; 2:39pm
URL: https://forum.jogamp.org/Questions-about-PBuffers-tp3581441p3582471.html
Of course manufacturers are free to put PBuffers in whatever memory they choose. Worse, they don't have to implement PBuffers at all.
Most will put them on the card, but some "steal" motherboard memory even for the display surface. So you just don't know.
A full page image at 1200 dpi and 4 bytes per pixel is about 1/2 gigabyte. I've never tried allocating anything bigger than 4096x4096, which is 8 times smaller, and older cards do not handle that well.
IMO you will have to probe the card to see how big a buffer you can allocate then render in chunks, tiling these into the full image. This will be especially true if the printer is very hi res or large format.
An additional note: It sounds like you intend to create a PNG file and then print the file. An alternative is to tile into a Printable GC in order to print directly from Java. It's not hard at all. If you need code, I can dig some out.
Or if you can accept less than full printer resolution, you can scale whatever the PBuffer size is into the Printable with 2D smoothing.