I tried rendering when the GLCanvas was not visible. The Frame that the GLCanvas was in was not visible. All I got was a black readback from the color buffer.
Is there a trick to this?
I tried rendering when the GLCanvas was not visible. The Frame that the GLCanvas was in was not visible. All I got was a black readback from the color buffer.
Is there a trick to this?
Probably won’t work because the GLCanvas expects the underlying device context to be present. You might try using a subordinate pbuffer to a GLCanvas, though. JOGL’s pbuffer support currently works on Windows and X11 with the Mac OS X port coming once 10.3 is released. See the jogl-demos project for a couple of examples that use pbuffers. However they all currently expect the parent window to be visible and I’m not sure whether they will work if it is hidden.
OK. I will open up an enhancement request on the project page. Being able to render to an offscreen canvas is a pretty necessary thing.
Basically there are lots of places where you need to take pictures to include into your regular scene. Rendering to pbuffers is also important, but what I am talking about is needing a whole new context, with different configuration, size, etc.
Please look at the pbuffer support JOGL currently has before you file an RFE. It provides a completely new, hardware-accelerated, offscreen context.