Login  Register

Re: Make screenshot of work display.

Posted by gouessej on Sep 11, 2012; 2:31pm
URL: https://forum.jogamp.org/Make-screenshot-of-work-display-tp4026085p4026097.html

Yes you must call readToBufferedImage only when the OpenGL context is current, for example in GLEventListener.display(), you cannot call it directly in your main method, you have to create a canvas, set a GLEventListener to it, use an animator and it will work fine.

Edit.: Maybe use an offscreen canvas.
Julien Gouesse | Personal blog | Website