Posted by
atrch on
Aug 03, 2020; 12:53pm
URL: https://forum.jogamp.org/GLException-No-device-available-error-on-Ubuntu-20-Intel-Graphics-tp4040754p4040762.html
Thank you both for your answers.
1) Wade: thank you for your insights, but maybe I was not clear, I do not use the Eclipse framework for OSGi, just running an OSGi app (using Apache Felix) directly in Eclipse for debuging purposes. If I understand well, the code you provided rely on Eclipse RCP (the "FileLocator" seems an Eclipse class).
2) Julien: Concerning OSGi, maybe I did not found the correct jars but the jogl-all or jogl-fat 2.4.0-RC do not have OSGi metadata and cannot be directly used in an OSGi container (I use Apache Felix).
I have found in this thread (
http://forum.jogamp.org/JOGL-with-OSGi-td3773888.html), a message from Wade explaining that "The trick I use is creating a project/bundle for JOGL that contains the gluegen and JOGL JARs, then creating fragment projects/bundles for each of the native platforms.", that's what I 'm doing.
That's why I am wrapping JOGL into an OSGi capable jar (one per each platform, in the current case, linux 64). But I looked more into details my wrapping and noticed that there are new natives for linux (in 2.4.0 ? or maybe before but I never noticed) that were missing in my OSGi wrapping, so I apologize for the question, the error was totally on my side. Now in Eclipse, I don't get the same error as before, but the following one, that seems more strange.
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: com.jogamp.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513)
at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609)
at java.awt.Container.addNotify(Container.java:2776)
at javax.swing.JComponent.addNotify(JComponent.java:4740)
at java.awt.Container.addNotify(Container.java:2776)
at javax.swing.JComponent.addNotify(JComponent.java:4740)
at java.awt.Container.addNotify(Container.java:2776)
...
This error appears when the frame.setVisible(true) method is called.
But as it is not mandatory for me to make JOGL works in Eclipse so I would totally understand if you cannot help me with my issue.
Once again, thank you all for helping me.
Arnaud