GLJPanel allocates one or two array backed IntBuffer for each instance. - 1: BuffereImage - 1: Vertical Flipping if GLSL flipping is n/a Extensive use leads to to out of memory errors on the CPU/JVM side.
Solved by attempting to use a singleton pixel buffer. Impl. now reuses generalized GLPixelBuffer* -> SingleAWTGLPixelBufferProvider, incl. row-length-stride where available (GL2GL3). Further beneficial is the generalized [AWT]GLPixelBuffer* refactored util class, allowing users to inject a pixel-buffer provider into a toolchain, here: - GLJPanel - GLReadBufferUtil New test case: TestGearsES2GLJPanelsAWT GLJPanel SingleAWTGLPixelBufferProvider's screenshots: <http://jogamp.org/files/screenshots/gljpanels-singlebuffer/>
GLJPanel still uses an individual GLPixelBuffer instance. If using SingleAWTGLPixelBufferProvider, the following creation sequence may happen: 1- 200x200 *new* 2- 400x400 *new* 3- 200x200 *reuse* the smaller prev. GLPixelBuffer are still in use, even though they could be dropped in favor of the current biggest GLPixelBuffer. Hence we have to validate, whether we can make the field static: AWTGLPixelBuffer pixelBuffer this would allow us to get rid of the prev. smaller allocations and save resources.
fixed, see 890dabf77593732bd9833350b441a37c60f74d45