Hi,
I needed to perform some offscreen opengl rendering for mixing java2D/Jogl purposes. I finally ended up writing a small test case with a JPanel drawing a BufferedImage (as an offscreen image).
This offscreen image is filled directly by a glReadPixel after a PBuffer display (glreadPixel directly fills the byte array of my BufferedImage for performance)
I then realized that I somehow reinvented the GLJpanel… but less performant obviously !
Although I do not claim to match the GLJpanel, I would like to know where I am loosing performance here
pbuffer.display() --> glReadPixels (directly on BufferedImage’s byte array (wrapped in a ByteBuffer)) --> graphics.DrawImage(offscreenImage)
And it is approximately 40% slower than the GLJpanel
Thanks for any hint .