-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ios fix #1950
Ios fix #1950
Conversation
There's no regressions on my end, so in principle it could be merged. But ideally someone who can test this on iOS would check it first. Is there anyone? |
Let me just try a couple more things today still @Rua just to be sure |
@@ -179,6 +179,9 @@ pub(crate) unsafe fn get_metal_layer_macos(view: *mut std::ffi::c_void) -> *mut | |||
let is_valid_layer: BOOL = msg_send![main_layer, isKindOfClass: class]; | |||
if is_valid_layer == NO { | |||
let new_layer: *mut Object = msg_send![class, new]; | |||
let () = msg_send![new_layer, setEdgeAntialiasingMask: 0]; | |||
let () = msg_send![new_layer, setPresentsWithTransaction: false]; | |||
let () = msg_send![new_layer, removeAllAnimations]; |
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 added these just to make sure we're doing the same function calls master
version is doing. Though I am unsure if these are necessary.
This is ready now |
I'll merge it, hopefully we can get other users to test and report any bugs. |
As part of my ongoing desire to also build my current project as an iOS app I discovered that iOS seems to be broken.
I am assuming that not many have been running Vulkano on iOS. So this PR is a result of a bunch of figuring out how to get an iOS app to compile and run on my iPhone 8 plus.
Error 1:
After fixing above by adding
dyn
Error 2:
After fixing above by
crate::statically_linked_vulkan_loader
Errors 3:
After fixing that with
Errors 4
Fix that with
Error 5
Already down the rabbit hole, make one for ios... how? ... Well my eventual investigation & debugging resulted in handling iOS and MacOS similarly to
wgpu
seen in this PR.I've managed to get this working nicely with resizes etc. following wgpu's approach
If you have xcode and apple developer subscription, you should be able to run bevy_vulkano_ios
There is also a simple
triangle
example in this branch.And lastly, to fix
create_surface_from_handle
, testing that in this branch