Re: Using Jogl for offscreen image composing (no GUI)
Posted by tarto on Jul 30, 2015; 11:51am
URL: https://forum.jogamp.org/Using-Jogl-for-offscreen-image-composing-no-GUI-tp4034993p4035003.html
Hi Sven,
After reading other posts on the forum and a bit of googling, I finally enabled Xvfb. Now, glxinfo returns without error, and it seems I have the virtual display in place.
I'm now trying to set a Drawable via the factory as you recommended, but to set the capabilities, I apparently need to provide a profile. GLProfile.getDefault() then throws :
com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :1, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x65db8b58, isOwner false, <65813fb3, 7c825850>[count 0, qsz 0, owner <NULL>]]]
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.jogamp.opengl.GLException: Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig and XVisual for visualID 0x0, X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :1, unitID 0, handle 0x153eb10, owner true, ResourceToolkitLock[obj 0x5bcb6222, isOwner true, <2136122, 509e1001>[count 1, qsz 0, owner <main-SharedResourceRunner>]]], idx 0], GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(X11GLXGraphicsConfigurationFactory.java:246)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createMutableSurfaceImpl(X11GLXDrawableFactory.java:524)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createDummySurfaceImpl(X11GLXDrawableFactory.java:535)
at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:283)
... 2 more
com.jogamp.opengl.GLException: Profile GL_DEFAULT is not available on X11GraphicsDevice[type .x11, connection :1, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x65db8b58, isOwner false, <65813fb3, 7c825850>[count 0, qsz 0, owner <NULL>]]], but: []
at com.jogamp.opengl.GLProfile.get(GLProfile.java:990)
at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:721)
at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:732)
at TestGL.main(TestGL.java:28)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:1, 0x153eb10, refCount 1, unCloseable false]
Could you indicate how the profile shall be set ?
Thanks for your support.