Hello!
I would like to use JOGL for offscreen rendering so that I could use the rendered images in a Swing program. The rendering does not have to be hardware-accelerated.
I would thus ask you whether it is possible in the current version of JOGL. I have been searching for this and I have not found any working code. The code at:
seems to be very long as for simply saving an image of an offscreen rendered scene, is not this a result of some missing features in JOGL API? Or should the code really be such as in that example?
By the way, the code does not work on my system FC3/JOGL 1.1 b07:
$ java OffscreenGLEL
java.lang.NullPointerException
at net.java.games.jogl.impl.x11.X11GLContext.chooseVisual(X11GLContext.java:319)
at net.java.games.jogl.impl.x11.X11OffscreenGLContext.create(X11OffscreenGLContext.java:148)
at net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.java:145)
at net.java.games.jogl.impl.x11.X11OffscreenGLContext.makeCurrent(X11OffscreenGLContext.java:133)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:250)
at OffscreenPanel.resizeContext(OffscreenPanel.java:40)
at OffscreenPanel.(OffscreenPanel.java:34)
at OffscreenGLEL.(OffscreenGLEL.java:31)
at OffscreenGLEL.main(OffscreenGLEL.java:13)
Is this possible for the the code be shorter in JOGL? Is there a cross-system reliable method of either hardware or software rendering of offscreen scenes? Or perhaps it is curently better to render to some iconified window? Would it work?