What is the best way to effectively get a BufferedImage from OpenGL code?
My best take on it is to create a GLWindow auto drawable and try to move it offscreen, then use AWTGLReadBufferUtil to read from it after display:
[Edit: Update URL:] https://github.com/reportmill/SnapKitGL/blob/main/src/snapgl/RenderImage.java
This has been working for me, with JOGL 2.3.2 and Java 8 on Apple M1. However, I have been having a devil of a time trying to upgrade to Java 11 and JOGL 2.4. GLWindow.create() seems to crash the JRE:
>> A fatal error has been detected by the Java Runtime Environment:
j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+11 email@example.com
Much of my research ends up with references that are years old. Is JOGL no longer being maintained and updated? Is there a better option for Java + OpenGL? I don't mean to complain - I know it's hard work (beyond my knowledge and skill set). I just thought there would be commercial entities interested in keeping some Java OpenGL solution alive and up to date.
My work doesn't make any money, but I can compile my Java work to the desktop and web. Unfortunately, my OpenGL desktop work is more unreliable than the web:
(Click on 'show samples' and choose Sample 3D)