Screenshot in Jogl 2.3.2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Screenshot in Jogl 2.3.2

Pradeep devraj

Hi All,

In prior version of JOGL i was creating snapshot with 
Screenshot.readToBufferedImage( drawable.getSurfaceWidth(), drawable.getSurfaceHeight() ).


Is there any api for same in JOGL 2.3.2

Thanks in advance

--

Reply | Threaded
Open this post in threaded view
|

Re: Screenshot in Jogl 2.3.2

gouessej
Administrator
Hi

You can use com.jogamp.opengl.util.awt.AWTGLReadBufferUtil, I think that there are some examples in jogl-demos and at least one unit test using it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Screenshot in Jogl 2.3.2

Pradeep
Thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: Screenshot in Jogl 2.3.2

gouessej
Administrator
You're welcome. I had to replace this call in the alpha version of my game yesterday, I called AWTGLReadBufferUtil.readPixelsToBufferedImage(gl, true) and javax.imageio.ImageIO.write(). You can use GLReadBufferUtil with TextureIO.write() if you want to get rid of AWT and Swing.
Julien Gouesse | Personal blog | Website