-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Use raw-window-handle #1279
Use raw-window-handle #1279
Conversation
Here is a minimal example for wgpu on android I did some time ago: msiglreith/wgpu-rs@991c081
|
I want to test this pr and compare it to @enfipy I don't have an android sdk installed, so if you could check this in the next couple of days that would be fantastic, but if not I might get around to it at some point |
render = ["bevy_internal/bevy_pbr", "bevy_internal/bevy_render", "bevy_internal/bevy_sprite", "bevy_internal/bevy_text", "bevy_internal/bevy_ui"] | ||
render = [ | ||
"bevy_internal/bevy_pbr", | ||
"bevy_internal/bevy_render", |
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.
This was a drive by automatic formatting, although I think this is nicer anyway
This is still a draft since it depends on unreleased features of This is not high priority, but if anyone needs this functionality (@aclysma ?) urgently, we can recreate the internal api of |
I also worked on the android activity lifecycle problem before noticing this ticket. Got a functional PoC-solution. This would require upstream commit to Please check out:
|
Your changes look like they wouldn't conflict with mine at all in that case, which is positive? So basically, this change would still be an improvement, and so can be safely merged once the raw-window-handle upstream catches up? |
Allright, sounds good! I've opened a pull request #1293 to continue discussion/development of the lifecycle part. |
Cool, that makes sense. |
I'm on board for these changes when upstream winit is ready for us. |
I've also opened rust-windowing/raw-window-handle#66, which we hopefully be able to use. |
This appears to no longer be blocked, per the linked issues :) Removing the label; hopefully we can get this polished and merged finally. |
V0.4 still isn't released - see https://crates.io/crates/raw-window-handle/versions |
It is worth pointing out that the new renderer is already using raw window handles: |
It's a simple enough change, that it can be recreated if needed. |
Closes #256
This depends on rust-windowing/raw-window-handle#52, which means that we need a release containing it (rust-windowing/raw-window-handle#58). That however is going to be a churny release, because rust-windowing/raw-window-handle#55 is massively breaking.
@msiglreith what you have said in rust-windowing/raw-window-handle#54 suggests that this approach is not suitable for android, if I'm understanding that correctly? Would we need to update the
TrustedWindowHandle
every frame on android?