Login  Register

Re: How to make screenshot on SWT

Posted by Sven Gothel on Oct 24, 2014; 11:17am
URL: https://forum.jogamp.org/How-to-make-screenshot-on-SWT-tp4033448p4033449.html

On 10/24/2014 12:54 PM, Paul [via jogamp] wrote:

> Hi everybody.
> Since Screenshot class was removed, I found the particular commit which says
> to use AWTGLReadBufferUtil.readPixelsToBufferedImage method.
> So I changed my code in my SWT app accordingly, but I'm getting weird exception
>
> javax.media.opengl.GLException: Should not call this
>         at
> jogamp.opengl.windows.wgl.WindowsExternalWGLContext$Drawable.getSurfaceWidth(WindowsExternalWGLContext.java:133)
> ~[jogl-all-2.2.4.jar:2.2.4]
>         at
> com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.readPixelsToBufferedImage(AWTGLReadBufferUtil.java:94)
> ~[jogl-all-2.2.4.jar:2.2.4]
>         at
> com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.readPixelsToBufferedImage(AWTGLReadBufferUtil.java:71)
> ~[jogl-all-2.2.4.jar:2.2.4]
>
> How should I fix my code?
[1] Please file a bug report, so we can fix it.

[2] You may use our SWT GLCanvas

> Thanks
> Paul

Thank you!

~Sven



signature.asc (828 bytes) Download Attachment