any chance with LWJGL to render to a PBuffer and save it to PNG with alpha ?
You could grab the pbuffer contents with glReadPixels and then create the .png with ImageIO. It’s going to be slow though, both the glReadPixels and (mostly) the PNG compression take time. If that’s ok with you, go for it, else try using an uncompressed format.
I use my own TIFF writer to avoid ImageIO, it’s quite fast too.
I’m not sure the PBuffer will hold the alpha channel information. Can you supply a working sample ?
Without requesting an FBConfig with alpha, there is no
assurance that there will even be an alpha channel in the Pbuffer…
Exactly, you have to request an alpha channel. Just like when creating the display, pass an 8 to the corresponding argument of the Pbuffer constructor.