-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Integrate with Maplibre Native Core #218
Labels
Comments
Collecting some resources for later:
|
This was referenced Jan 4, 2025
I have a functioning example of OpenGL within AWT: https://github.com/sargunv/awt-opengl-sample/blob/main/app/src/main/kotlin/org/example/App.kt |
This was referenced Jan 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The MapLibre Android and MapLibre iOS SDKs are convenient, but they do a lot of work and hide some internals that would be better for us to implement in compose and KMP. Additionally, there's no such SDK for desktop platforms, and the current web view solution for desktop is problematic.
If we need to build on the C++ core for desktop, it's good opportunity to do the same for all three native platforms and move more code (gestures, styling, controls, etc) all into common code. For web, we can then disable anything not related to rendering, display under the Compose canvas, and operate with all the same common controls and gestures as native.
List of issues that would be solved or aided with this
Alternative
Why not just keep using the iOS and Android SDKs and just disable SDK ornaments, gestures, and animations?
Downsides of integrating with the native core
Kotlin to C++ integration requirements
@objc
)So the most straightforward solution is probably to write C bindings for MLN and use it on both sides.
Platform integration specifics
(mostly guesswork here as I'm still learning about the native core)
Android
Android will render into a
Surface
. The Android SDK today renders to aGLSurfaceView
or aTextureView
, but if we're reimplementing this we should ideally be agnostic to where theSurface
comes from so we can use it with Jetpack Compose'sAndroidExternalSurface
andAndroidEmbeddedExternalSurface
composables.We'll want to provide some implementation for both OpenGL and Vulkan; unsure how that'll be packaged exactly.
iOS
I've done no research here, but presumably we can do it with the Metal renderer the same way the iOS SDK currently does (probably MKTView?).
Desktop
We need to embed the native OpenGL, Vulkan, and/or Metal renderer into a Swing panel within Compose. Perhaps with JOGL for OpenGL?
Doing some research on whether anyone has done this in Compose yet, and I haven't found anything (just this bare YouTrack)
The text was updated successfully, but these errors were encountered: