Login  Register

Re: Offscreen Rendering with GLCanvas which wasn't created with this capability ?!

Posted by gouessej on Nov 03, 2014; 9:27am
URL: https://forum.jogamp.org/Offscreen-Rendering-with-GLCanvas-which-wasn-t-created-with-this-capability-tp4033474p4033480.html

Hi

You can put the GLCanvas into a JPanel and call JPanel.paint(BufferedImage.createGraphics()). Override the method paintComponent(Graphics) of the JPanel so that it calls GLAutoDrawable.display(). It's hacky but it might work. You can use the BufferedImage to retrieve the rendered "data" and display them where you want. Good luck.
Julien Gouesse | Personal blog | Website