Skip to content

Allow PlatformEGLHeadless to load GLES#9488

Merged
bejado merged 5 commits intogoogle:mainfrom
PatRibas:main
Dec 5, 2025
Merged

Allow PlatformEGLHeadless to load GLES#9488
bejado merged 5 commits intogoogle:mainfrom
PatRibas:main

Conversation

@PatRibas
Copy link
Contributor

@PatRibas PatRibas commented Dec 4, 2025

PlatformEGLHeadless only loads regular OpenGL, not GLES. This change allows PlatformEGLHeadless to also use GLES to help write tests against FL0.

BUGS = [462485141, 449755952]

Copy link
Collaborator

@pixelflinger pixelflinger left a comment

Choose a reason for hiding this comment

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

this looks pretty good, except for the requestES2Context change which I think is not necessary.

@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Dec 5, 2025
@pixelflinger
Copy link
Collaborator

Also please provide a better description for the change.

@PatRibas
Copy link
Contributor Author

PatRibas commented Dec 5, 2025

Also please provide a better description for the change.

Added a description to the merge comment in Github.

Copy link
Member

@bejado bejado left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe also add a BUGS = [b/xyz] to the PR description to associate with a Buganizer bug.

@bejado bejado merged commit 0b44761 into google:main Dec 5, 2025
13 checks passed
*/


#if defined(__ANDROID__) || defined(FILAMENT_USE_EXTERNAL_GLES3) || defined(__EMSCRIPTEN__)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this mean EGL only ever works with GLES?

Tried to build headless but can't because it keeps giving me GLES.

Or is there some other pathway that supposed to be used to use EGL with regular GL? Or is EGL just not supported in filament for regular OpenGL?

New to filament just trying to figure out why it won't work.

Copy link
Contributor Author

@PatRibas PatRibas Feb 3, 2026

Choose a reason for hiding this comment

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

Hmm, you should be able to still use regular GL with these changes, but reading this again it's possible something got mucked up. If you're unable to get it to work with BACKEND_OPENGL_VERSION_GL defined and need to make changes, feel free to open a PR and add anyone you see approving changes as a reviewer. Wonder if this is supposed to be something like || (defined(FILAMENT_SUPPORTS_EGL_ON_LINUX) && !defined(BACKEND_OPENGL_VERSION_GL).

Copy link
Contributor

Choose a reason for hiding this comment

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

I took a slightly deeper look and it looks like it goes a bit deeper than that since it branches off into the bluegl code and it doesn't seem to have any edge cases with EGL support or anything. Though the initialization is probably very similar I don't think that code is shared unfortunately and it seemed like much more work to remove GLX and X11 includes to get a EGL+GL without any GLX or X11. Prob just going to stick with Vulkan in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Issue/PR does not affect clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants