-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
video/wayland: use EGL_EXT_present_opaque when available #4646
Conversation
Added a hint of top of this to support transparent windows, in case someone ever needs it: |
Good idea; I added your commit to the PR 👍 |
src/video/khronos/EGL/eglext.h
Outdated
#ifndef EGL_EXT_present_opaque | ||
#define EGL_EXT_present_opaque 1 | ||
#define EGL_PRESENT_OPAQUE_EXT 0x31DF | ||
#endif /* EGL_EXT_protected_content */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EGL_EXT_protected_content
Only just realized this is copied from the extension below it... the Mesa patch has this too!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, guilty as charged 😅
Thanks for noticing that, I'll fix it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, this src/video/khronos/EGL/eglext.h
change was only meant to reflect the real change that will be to pull this file from upstream once the extension lands (and when I do that, other things in this file will change, starting with the date in the header, and possibly other changes that hadn't been carried over yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to check and see how we do header updates here... sometimes we use the header and sometimes we define it in SDL_egl.c, I'm actually not sure what the rule is there. Ryan or Sam might know though.
The hint documentation seems to be misleading for non-EGL platforms. |
It's probably worth re-wording to |
The EGL extension has been merged into the registry - with that in mind I've redone the hint patch to be worded more in line with what the extension suggests: Which leaves one last question... @slouken, @icculus, how should we integrate the new attrib define? Is it enough to update the Khronos headers in our repo, or do we need to add it to SDL_egl.c as well to account for older EGL headers outside of the ones we provide? |
Checked this on flibitBuild and it appears we will indeed need to define this in SDL_egl.c as well. @1ace, I believe this is all that's needed at this point:
Once that's all in place I'll get this in! |
@flibitijibibo Thanks! I just had a go at updating the local SDL copy of the EGL headers, and they're massively out of date, to the point where I'm not confident the update won't break something. I think I'll make a separate PR to update them, and only do your points 2 & 3 in this PR :) |
Alright, PR updated 👍 |
Looks great, thanks for putting this whole extension together btw! |
Description
This should fix the issue with the games requesting alpha configs and not filling the alpha channel all the way to 100%
Existing Issue(s)
@flibitijibibo I couldn't find any GitHub issue for this issue; let me know if there was one and I'll add
Closes #123
here :)checklist: