Hello!
I’ve made a first draft (already usable) of a PBuffer canvas peer.
There is also a PBufferCanvas3D for use with a View, and a
screenshot of all this in a swing application.
See : http://nicolas.brodu.free.fr/xith3d/
This CanvasPeer renders into an Image made from a
pbuffer, so it uses hardware acceleration.
Note that since the pbuffer is is copied back to an
image in main ram, this is probably not what you want
to make fast games.
On the other hand, if all you want is visualize large scenes
requirering HW rendering to compute, and with a nice Swing
interface all around, this maybe worth a look.
The canvas only renders the scene when updateImage is called.
It will not render the scene when View.renderOnce() is called.
TODO: Many improvements.
Main idea would be to write directly to a VolatileImage. Indeed, as it is now,
the rendering happens on a pbuffer in vram. But instead of a direct vram->vram
operation as could be expected with a VolatileImage, the BufferedImage used here
does vram->ram and then will do ram->vram again when the user displays the image.
Happy hacking!
Nicolas