Repository: libgdx/libgdx

Issue #7245: Error selecting angle renderer on desktop
Created: 2023-10-03T14:09:56Z
Please ensure you have given all the following requested information in your report.
Issue details
Can't use angle renderer backend on Windows 11 with integrated plus dedicated GPU.
Reproduction steps/code
use this for Desktop config
config.setOpenGLEmulation(Lwjgl3ApplicationConfiguration.GLEmulation.ANGLE_GLES20, 0, 0);
Version of libGDX and/or relevant dependencies
Libgdx 1.12.1
Stacktrace
Caused by: java.lang.IllegalStateException: setFunctionMissingAddresses has been called already
Please select the affected platforms
Windows 11

Duplicate issue #7252: IllegalStateException if ANGLE_GLES20 is set for Lwjgl3Application
Created: 2023-10-06T19:12:41Z
Issue details
new Lwjgl3Application will throw an IllegalStateException if ANGLE_GLES20 is set in the config.
This happens since 1.12.1, most likely related to the upgrade of Lwjgl 3.3.3
Reproduction steps/code
...
config.setOpenGLEmulation(Lwjgl3ApplicationConfiguration.GLEmulation.ANGLE_GLES20, 0, 0);
new Lwjgl3Application(new Game(), config);
Version of libGDX and/or relevant dependencies
1.12.1-SNAPSHOT (works perfectly fine with 1.12.0)
Stacktrace
21:04:16: Executing ':desktop:DesktopLauncher.main()'...

Task :core:compileJava UP-TO-DATE
Task :core:processResources NO-SOURCE
Task :core:classes UP-TO-DATE
Task :core:jar UP-TO-DATE
Task :desktop:compileJava UP-TO-DATE
Task :desktop:processResources NO-SOURCE
Task :desktop:classes UP-TO-DATE


Task :desktop:DesktopLauncher.main()

Exception in thread "main" java.lang.ExceptionInInitializerError
at org.lwjgl.opengl.GL11.(GL11.java:38)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:467)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:448)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:162)
at de.creutzenberg.towerdefence.DesktopLauncher.main(DesktopLauncher.java:68)
Caused by: java.lang.IllegalStateException: setFunctionMissingAddresses has been called already
at org.lwjgl.system.ThreadLocalUtil.setFunctionMissingAddresses(ThreadLocalUtil.java:202)
at org.lwjgl.opengl.GL.create(GL.java:182)
at org.lwjgl.opengl.GL.create(GL.java:126)
at org.lwjgl.opengl.GL.create(GL.java:112)
at org.lwjgl.opengl.GL.(GL.java:85)
... 5 more

Task :desktop:DesktopLauncher.main() FAILED
4 actionable tasks: 1 executed, 3 up-to-date

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':desktop:DesktopLauncher.main()'.


Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin\java.exe'' finished with non-zero exit value -1073740791


Try:


Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.


Get more help at https://help.gradle.org

BUILD FAILED in 7s
21:04:24: Execution finished ':desktop:DesktopLauncher.main()'.

#### Please select the affected platforms
- [ ] Android
- [ ] iOS
- [ ] HTML/GWT
- [X ] Windows
- [ ] Linux
- [ ] macOS

Closing comment (2023-10-06T19:14:02Z): (Just noticed this is a duplicate of #7245)