Posted by
Sven Gothel on
Jul 29, 2015; 2:09pm
URL: https://forum.jogamp.org/Using-Jogl-for-offscreen-image-composing-no-GUI-tp4034993p4034995.html
On 07/29/2015 10:52 AM, tarto [via jogamp] wrote:
> 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.
Use GLDrawableFactory -> createOffscree*() for FBO/Texture target.
>
> 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
Yes, we need one WM available .. if supported on the platform.
Here it seems X11 is available but no server running?
In this case, just kick-off an offscreen FB server instance
to satisfy the desktop GL library.
Or .. you have access to an EGL/ES OpenGL driver,
in this case our EGL/ES backend shall work.
GLDrawableFactory has a getter to fetch an instance of
either desktop (here X11) or 'embedded' (EGL/ES).
>
> 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 ?
~Sven