Skip to content

New GL/GLES backend for jme (Work in progress)#2585

Draft
riccardobl wants to merge 6 commits intojMonkeyEngine:masterfrom
riccardobl:angle
Draft

New GL/GLES backend for jme (Work in progress)#2585
riccardobl wants to merge 6 commits intojMonkeyEngine:masterfrom
riccardobl:angle

Conversation

@riccardobl
Copy link
Member

@riccardobl riccardobl commented Jan 25, 2026

This started with the intention of adapting the current glfw+lwjgl3 backend to use angle, but it turned out that glfw has some major limitations that break angle in wayland.

After trying to workaround these limitations, with no success, I decided to rewrite (with the help of gpt 5.3) the entire lwjgl3 backend to use SDL3, that is now available in lwjgl 3.4 and that we are already using for controllers (due to, again, more glfw limitations).

That said, this is a summary of what this PR does:

  • entirely replaces glfw with sdl3
    • removes glfw dependency
  • implements angle built here
    • patches the angle source code and prioritizes vulkan on linux to workaround some nvidia bugs with opengl
  • replaces the unreliable sRGB default framebuffer with an offscreen framebuffer
    • when gamma correction = true an offscreen RGBA16F framebuffer is passed to jme
    • jme renders to it as usual (doesn't even know it is not the default fb)
    • the offscreen fb is converted to srgb and blitted to the default framebuffer automatically using a shader
  • removes opencl
    • as discussed, it is mostly untested and unused and doesn't work on every platform we support
  • deprecates every opengl version before 3.2
  • set some better defaults (related to Plan to remove default dependency from AWT Settings launcher #2626)

This is still a work in progress, but it is a step forward in making GLES 3.0 the jME baseline across every platform.

@github-actions
Copy link

github-actions bot commented Jan 25, 2026

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

  • Go to the (failed run) > Summary > Artifacts > screenshot-test-report
  • Download the zip and open jme3-screenshot-tests/build/reports/ScreenshotDiffReport.html

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@riccardobl riccardobl changed the title Angle backend (Work in progress) Angle GLES backend for desktop (Work in progress) Jan 25, 2026
@riccardobl riccardobl changed the title Angle GLES backend for desktop (Work in progress) New GL/GLES backend for jme (Work in progress) Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant