Using Jogl for offscreen image composing (no GUI)
Posted by tarto on Jul 29, 2015; 8:52am
URL: https://forum.jogamp.org/Using-Jogl-for-offscreen-image-composing-no-GUI-tp4034993.html
Dear all
The idea is to have a remote server processing some commands text file, and composing an image based upon those instructions. I was thinking of using Jogl to render that image offline on a texture or a PBO, and then save the image when done with readPixels for later download.
I am new to Jogl but I understood at least that it is no possible to retrieve a GL object statically. I am thus trying to set a GLCanvas and access the GL object reference through the GLEventListener. At some point GLProfile.initSingleton is always called and throws the following Exception:
com.jogamp.nativewindow.NativeWindowException: X11Util.Display: Unable to create a display(nil) connection
My interpretation is that this is because my remote machine has no GUI (and wont have one). Is this is really the reason of this Exception ? If so, how to get rid of it and how to get a reference of a GL instance for pure offscreen rendering ?
Thank you for any help !