Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLException: Unable to determine GraphicsConfiguration #208

Open
clarisma opened this issue Mar 3, 2023 · 2 comments
Open

GLException: Unable to determine GraphicsConfiguration #208

clarisma opened this issue Mar 3, 2023 · 2 comments

Comments

@clarisma
Copy link
Contributor

clarisma commented Mar 3, 2023

Running Version 0.4.0 on Windows 10 results in the following exception at startup:

Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x19b843ba]], idx 0], pfdID 4, ARB-Choosen false,
        requested 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[.]],
        chosen    GLCaps[wgl vid 4 gdi: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/0, dp/st/ms 16/8/0, dbl, mono  , sw, GLProfile[GL2/GL2.sw], on-scr[.]]]
        at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182)
        at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
        at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513)
        at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:729)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/java.awt.Window.addNotify(Window.java:791)
        at java.desktop/java.awt.Frame.addNotify(Frame.java:495)
        at java.desktop/java.awt.Window.pack(Window.java:829)
        at org.osm2world.viewer.view.ViewerFrame.<init>(ViewerFrame.java:123)
        at org.osm2world.console.OSM2World.executeArgumentsGroup(OSM2World.java:205)
        at org.osm2world.console.OSM2World.main(OSM2World.java:144)

Proposed Solution

Supply --add-exports arguments to the JVM, preferably via a launcher script (based on solution to this issue):

java 
  --add-exports java.base/java.lang=ALL-UNNAMED 
  --add-exports java.desktop/sun.awt=ALL-UNNAMED 
  --add-exports java.desktop/sun.java2d=ALL-UNNAMED 
  -jar osm2world-0.4.0-SNAPSHOT.jar --gui
@tordanik
Copy link
Owner

tordanik commented Mar 3, 2023

Can you confirm that running OSM2World using the osm2world-windows.bat script makes a difference?

@clarisma
Copy link
Contributor Author

clarisma commented Mar 3, 2023

Yes, this works, thanks.

(I am getting other exceptions when attempting to render, but I believe they are related to a graphics driver issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants