-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
[macOS / Windows] Add optional ANGLE support. #72475
Conversation
Mh, I'm not sure, but this looks like this works with EGL? I'm not sure if ANGLE magic is changing things up. Couldn't this be based somehow on #68944? If there's no magic behind the scenes we could avoid having multiple EGL manager implementations floating around when the time comes. I guess that, with that PR, there could be two derived EGL managers: I also recall @clayjohn trying to do ANGLE stuff with my generic I'm curious on what's possible and I'd be glad to help, but I know nothing about Apple developoment so I might be ignoring important stuff. |
Apart for a few extra attributes for the display creation and two Objective-C lines which can be moved to the DisplayServer, it should be generic EGL, so I guess it can use the same GLManager. I'm not sure about GLAD (it does not support ANGLE platform extensions, but it's probably only a few enums), I'll check it out. |
ec0892b
to
48c5c4b
Compare
Updated to use common EGL manager based on #68944 and GLAD (dylibs are no longer necessary to build Godot, only to run with GL renderer). Since it's using GLES not GL I have added a few extra virtual methods to the EGL manager to configure API type and arguments for display and context. GL/GLES defines and includes will need a bit of cleanup, it's a mess right now. |
Great!
I saw the diff and those methods seem to make sense, great job! I'm glad that the driver's API is good enough even for this funky library.
Yeah, I noticed that too. There's also some GLAD-related stuff that isn't confined in its own defines. |
48c5c4b
to
498527c
Compare
Added |
498527c
to
63f6347
Compare
07ffb81
to
b2fa96d
Compare
…d EGL_ANDROID_blob_cache caching. Co-authored-by: Riteo <riteo@posteo.net>
b2fa96d
to
dffec34
Compare
As a note, our original plan for ANGLE was to utilize it as an optional driver (like how you will be able to select between Vulkan and D3D12). How difficult do you think it would be to make angle/non-angle selectable in the project settings instead of making it a compile time option? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Got it working on macOS, so it is possible. Need a lot of cleanup, and some extra work to make sure it is working on mobile and web, since these do no use GLAD. Also, I have not touched OpenXR stuff at all. But here's a draft branch: https://github.com/bruvzg/godot/tree/angle%2B%2B An |
Superseded by #72831 |
A new version of #54914
Pre-build ANGLE libraries are required, build it from source or get from the CEF minimal distribution. Headers are included.
To test it with upstream ANGLE:
libEGL.dylib
andlibGLESv2.dylib
to the .app bundleFrameworks
folder (macOS).libEGL.dll
andlibGLESv2.dll
to the executable folder (Windows).ANGLE platform type can be selected by running Godot with
--angle-platform-type type
command line argument.type
values are:metal
(default) andopengl
.type
values are:d3d11
(default),vulkan
, andopengl
.