Two GL Canvases screen capture issues.

Hi

I have been doing Screencapture using the TileRenderer classes, and have ran into a problem, if I create a GLCanvas (which has a GLEventListener attached to it) with geometry being displayed in it, an image of this is attached as image1.jpg.

Then create a second GLCanvas (without a GLEventListener), in the top left corner of the screen overlapping the other canvas in which I use the TileRenderering class to do render the same geometry as in the first in order to get a higher resolution, also the canvases do not share contexts. An image of this is attached as image2.jpg.

The problem is that the glReadPixels call seems to be reading what is beneath the top canvas where the gl calls are being made, it is even renderering the swing gui components (that are beneath the canvas) of the application surrounding the first canvas. Example of the output is attached as image3.jpg.

The specification the machine this happens on is running linux (Red Hat Enterprise) using a jre 1.4.2_06, and the graphics card is a nVidia Quadro2 MXR/AGP/SSE2, supporting OpenGL 1.5.5 with the latest drivers: NVIDIA 81.78. I have run the same application on WindowsXP and there is no problems. The version of JOGL I am using is JSR-231 Beta 3.

Any help or suggestions in sorting this out would be great.

Thanks
Mike

When you take your screen shot, have you tried rendering into an off-screen pbuffer rather than the on-screen window? You should be able to completely reuse your GLEventListener and this should address the problem.

I do have an alternative that uses pbuffers, which works fine, but I was just trying this in case someone using the application does not have pbuffer support.

But if you think using the same GLEventListener should address the problem I will give it ago.

Thanks
Mike

Not sure whether my point was clear, but if your card has issues with overlapping windows then you should be able to just use a GLPbuffer rather than a GLCanvas to take the screenshot. The point about the GLEventListener is just that the code contained within should work identically with a GLCanvas or a GLPbuffer.