Re: Is it possible to create a screenshot with JOCL?
Posted by
gouessej on
May 29, 2020; 9:48am
URL: https://forum.jogamp.org/Is-it-possible-to-create-a-screenshot-with-JOCL-tp4040656p4040664.html
You can use com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.readPixelsToBufferedImage​() to do that with JOGL. It's a first step, I think that you could optimize this solution in order to avoid creating a brand new BufferedImage for each frame, look at the source code of GLJPanel to understand how to achieve that. Ideally, you should only modify the internal buffer of an image or (if possible) rather use a canvas.
It's not the right place to ask for help about the third party API you mentioned in your very last sentence which isn't part of JogAmp. I assume that you did a spelling mistake.