-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Render directly to lower-level graphics surface #53
Comments
Possibly related to #47 and #28. The surface is handled through: https://github.com/rust-windowing/raw-window-handle All surfaces supported by it can be supported using wgpu. |
Thinking about this, Will that help you out at least a little bit here? |
Not really, the code to turn a NativeActivity into a RawWindowHandle is simple (and unsafe :D) https://github.com/rust-windowing/winit/blob/master/src/platform_impl/android/mod.rs#L785 We actually need to avoid using NativeActivity in maplibre-rs completely. |
Sorry, I meant |
And I did read too quickly :D Actually EDIT: I think we somehow can pass a Surface directly via JNI? https://stackoverflow.com/a/24313036
|
@MarijnS95 So, yes I suspect we could already do this by passing a surface to Rust and then just implementing an unsafe RawWindowHandle on top of it. Maybe no changes in the NDK are required for that. The difficult part will probably be to handle inputs. Status Quo: Rendering to a surface probably works already fine on iOS and Android. Handling input is a different story though. |
It looks like you can get that info straight from #28 / rust-mobile/ndk#262 (comment): apparently you can use that for interop with OpenGL textures, though the
Yes, as long as you can get hold of a
Ah yes, you can apparently also go from a JNI I haven't used the APIs for myself yet so we're just piecing together function return types into function arguments at this point, seems there are multiple ways of doing this. In either scenario it seems that this needs to go through
I don't think an input queue can be attached to a non- |
Ah yes, the docs for
So there's no point going through a |
You are probably right. I would actually be quite happy to remove the We should create an experiment for iOS and Android soon. |
I haven't fiddled with Let us/me know if you need anything to change or be added in the NDK. I went ahead and added the missing JNI |
Closing in favor of this one: #28 |
Like
maplibre-gl-native
, this library could support rendering to lower-level graphics surfaces, ideallyThis would allow easier integration to custom apps or other libraries like Qt.
The text was updated successfully, but these errors were encountered: