Bug 1128

Summary: javax.media.opengl.GLException: Intialization of GL renderer strings failed
Product: [JogAmp] Jogl Reporter: Krasimir Kostadinov <krasimir.k>
Component: coreAssignee: Sven Gothel <sgothel>
Status: UNCONFIRMED ---    
Severity: major CC: krasimir.k, sgothel
Priority: ---    
Version: 2   
Hardware: pc_x86_64   
OS: linux   
Type: --- SCM Refs:
Workaround: ---
Attachments: The jogl debug trace when GLDrawableFactory.getFactory( glprofile ).createExternalGLContext is invoked

Description Krasimir Kostadinov 2015-02-07 23:08:42 CET
Created attachment 688 [details]
The jogl debug trace when GLDrawableFactory.getFactory( glprofile ).createExternalGLContext is invoked

Hello,
The example for SWT given in https://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing
generate the following error:

libEGL warning: failed to create a pipe screen for i965
Exception in thread "main" javax.media.opengl.GLException: Intialization of GL renderer strings failed. X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7fdd7819dbd0, owner false, ResourceToolkitLock[obj 0x1810399e, isOwner false, <32d992b2, 215be6bb>[count 0, qsz 0, owner <NULL>]]] - 0.0 (Compat profile, hardware)
	at jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:1451)
	at jogamp.opengl.x11.glx.X11ExternalGLXContext.<init>(X11ExternalGLXContext.java:65)
	at jogamp.opengl.x11.glx.X11ExternalGLXContext.create(X11ExternalGLXContext.java:112)
	at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createExternalGLContextImpl(X11GLXDrawableFactory.java:546)
	at jogamp.opengl.GLDrawableFactoryImpl.createExternalGLContext(GLDrawableFactoryImpl.java:476)
	at com.eda.Main.main(Main.java:70)

As attachment you can find the debug trace from JOGL.

Environment:

Used JOGL version v2.2.4

Laptop with Intel(R) Core(TM) i7-2640M CPU. The internal GPU is used. There is no external GPU card available on this laptop.

OS : Ubuntu 14.04.01 with GL info:
GL_RENDERER   = Mesa DRI Intel(R) Sandybridge Mobile 
GL_VERSION    = 3.0 Mesa 10.1.3
GL_VENDOR     = Intel Open Source Technology Center

Using freeglut library examples and glxgears -info does not have problems with OpenGL initialization.

Eclipse IDE Luna 4.4 with added swt.jar, gluegen-rt-natives-linux-amd64.jar, gluegen-rt.jar, jogl-all-natives-linux-amd64.jar, jogl-all.jar, jogl.jar in the java library path.

Linux kernel : 3.13.0-45-generic #74-Ubuntu SMP 

Any help is appreciated!

Krasimir Kostadinov
Comment 1 Krasimir Kostadinov 2015-02-15 17:43:22 CET
The example with JOGL in AWT works fine. The warning message "libEGL warning: failed to create a pipe screen for i965" appears, but the triangle is shown.
Comment 2 Krasimir Kostadinov 2015-02-15 18:19:54 CET
Moving creation of glprofile before setting current glcanvas like:
...
GLProfile glprofile = GLProfile.getDefault();
glcanvas.setCurrent();
...

resolve the exception when createExternalGLContext is invoked, but the screen is black and the triangle is shown at random time when window is resizing.
Comment 3 Krasimir Kostadinov 2015-02-15 19:39:16 CET
Adding SWT menu resolve the flickering problem:

shell.setSize( 640, 480 );
        
Menu bar = new Menu (shell, SWT.BAR);
shell.setMenuBar (bar);
MenuItem fileItem = new MenuItem (bar, SWT.CASCADE);
fileItem.setText ("&File");

final Composite composite = new Composite( shell, SWT.NONE );
composite.setLayout( new FillLayout() );
Comment 4 Sven Gothel 2015-03-06 21:49:53 CET
(In reply to comment #3)
> Adding SWT menu resolve the flickering problem:
> 
> shell.setSize( 640, 480 );
>         
> Menu bar = new Menu (shell, SWT.BAR);
> shell.setMenuBar (bar);
> MenuItem fileItem = new MenuItem (bar, SWT.CASCADE);
> fileItem.setText ("&File");
> 
> final Composite composite = new Composite( shell, SWT.NONE );
> composite.setLayout( new FillLayout() );

Can you provide a patch for the test files,
preferably using git?

Maybe you like to update the wiki as well,
in which case I will grant you edit permission.
Comment 5 Krasimir Kostadinov 2015-03-14 22:37:46 CET
(In reply to comment #4)
> (In reply to comment #3)
> > Adding SWT menu resolve the flickering problem:
> > 
> > shell.setSize( 640, 480 );
> >         
> > Menu bar = new Menu (shell, SWT.BAR);
> > shell.setMenuBar (bar);
> > MenuItem fileItem = new MenuItem (bar, SWT.CASCADE);
> > fileItem.setText ("&File");
> > 
> > final Composite composite = new Composite( shell, SWT.NONE );
> > composite.setLayout( new FillLayout() );
> 
> Can you provide a patch for the test files,
> preferably using git?

Do not understand what exactly you mean "to provide a patch for the test files".
I can provide a test files or complete Eclipse project.

> 
> Maybe you like to update the wiki as well,
> in which case I will grant you edit permission.

Yes, I would like to make an update for the wiki. Can you create an account?

Regards,
Krasimir