Skip to content

Don't force non-srgb capable framebuffer in desktop backend#2824

Merged
riccardobl merged 7 commits into
jMonkeyEngine:masterfrom
riccardobl:fixups
May 28, 2026
Merged

Don't force non-srgb capable framebuffer in desktop backend#2824
riccardobl merged 7 commits into
jMonkeyEngine:masterfrom
riccardobl:fixups

Conversation

@riccardobl
Copy link
Copy Markdown
Member

@riccardobl riccardobl commented May 27, 2026

As reported here: #2823

When using OpenGL (instead of the default ANGLE_GLES) in the new desktop renderer backend, the window creation can fail.

This surfaced two issues:

  • The OpenGL path uses GLX instead of EGL
  • the backend requests specifically a non-srgb capable framebuffer, that might limit the compatibility with some platforms

This PR fixes both.
(edit: EGL is not forced on X11, since gemini says some X11 platforms might not be compatible)

closes #2823

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors OpenGL driver hints and window creation logic in LwjglWindow.java. It replaces configureAngleHints with configureOpenGLDriverHints, forces EGL on Linux when ANGLE is not used, and simplifies window creation by removing sRGB framebuffer fallback logic. A review comment suggests respecting the isX11PlatformPreferred() setting on Linux before forcing EGL to avoid breaking compatibility on older X11 systems.

Comment thread jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@riccardobl riccardobl changed the title Use EGL in OpenGL backend and don't force non-srgb capable framebuffer Don't force non-srgb capable framebuffer in desktop backend May 27, 2026
@stephengold
Copy link
Copy Markdown
Member

I verified this fix by using commit 4f26497 to run TestBrickTower using LWJGL-OpenGL3.

@riccardobl riccardobl merged commit d5cdad6 into jMonkeyEngine:master May 28, 2026
10 checks passed
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

Successfully merging this pull request may close these issues.

"Couldn't find matching GLX visual" during LWJGL v3 display initialization

2 participants