Login  Register

GLJPanel + FBO + J2D OpenGl pipeline

Posted by rachotilko on Mar 07, 2011; 12:45pm
URL: https://forum.jogamp.org/GLJPanel-FBO-J2D-OpenGl-pipeline-tp2645994.html

Hello

I'm trying to do an offscreen texture generation using FBOs during the 'display' routine of the GLJPanel-attached GLEventListener. My framebuffer's color-attached textures are generally larger than GLJPanel's surface. Once the offscreen rendering is finished, I render a part of the resulting texture on-screen.

Anyway, the output texture of the rendering process is glitched, when the J2D OpenGL pipeline is activated. The output is just fine when not using any J2D accelleration.

Note that:

1, I am aware of the fact that J2D OpenGL pipeline utilizes FBO's, so I take care to properly save&restore the current framebuffer binding and its color attachments at the start/end of the offscreen rendering.

2, The problem is not caused by subsequent on-screen drawing of the texture, as I saved the texture into the file and it turned out to be glitched the exactly same way as on the screen.

So, my question is: "is the combination of GLJPanel + FBO + (accelerated J2D) supported ?"

PS. I'm doing this in the context of old JOGL1 (I use it for the sake of JOGL1's cute Netbeans plugin, which is still not ported to JOGL2). Will migrating help to JOGL2 mitigate the issue ?