Skip to content
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

Allow choosing rendering backend on Android during initialization #3079

Open
louwers opened this issue Dec 11, 2024 · 1 comment
Open

Allow choosing rendering backend on Android during initialization #3079

louwers opened this issue Dec 11, 2024 · 1 comment
Labels
android build Related to build, configuration or CI/CD OpenGL Issues related to the OpenGL renderer backend Vulkan

Comments

@louwers
Copy link
Collaborator

louwers commented Dec 11, 2024

Please upvote this issue if you are interested in this, or leave a comment if you have additional context and implementation ideas.


Is your feature request related to a problem? Please describe.

Allow a choosing between Vulkan and OpenGL ES rendering backend on Android on map initialization.

Describe the solution you'd like

On map initialization we should allow passing an enum value VULKAN, OPENGL or AUTO.

With the AUTO option we would detect what rendering backend is supported and default to that.

Describe alternatives you've considered

Releasing MapLibre Android with different backends as different libraries. This will happen starting 11.7.0:

  • org.maplibre.gl:android-sdk (OpenGL)
  • org.maplibre.gl:android-sdk-vulkan (Vulkan)

The downside of this is that there is some build and distribution complexity involved when building different apks and distributing those. It is also easier for other platforms that depend on MapLibre Android, like current implementations of MapLibre for Flutter, React Native and Kotlin Multiplatform, to intergrate.

The downside of using multiple libraries in one library is that the size of the library will increase. We should give people the option to use only Vulkan or only OpenGL ES, or configure their release process to distribute multiple apks. That is why I think that starting with MapLibre Android 12.0.0 we should publish the library as three different packages.

  • org.maplibre.gl:android-sdk (OpenGL ES + Vulkan, defaulting to automatic selection)
  • org.maplibre.gl:android-sdk-opengl (OpenGL ES)
  • org.maplibre.gl:android-sdk-vulkan (Vulkan)

Additional context

A run-time switch (i.e. when the map is already initialized) is out of scope for this issue.

@louwers louwers added android build Related to build, configuration or CI/CD OpenGL Issues related to the OpenGL renderer backend Vulkan labels Dec 11, 2024
@Vichy97
Copy link

Vichy97 commented Dec 15, 2024

This would be great to be able to slowly roll out Vulkan based on a feature flag. Right now Vulkan seems very unstable so if I make the switch eventually I'd like to roll out slowly and monitor for crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android build Related to build, configuration or CI/CD OpenGL Issues related to the OpenGL renderer backend Vulkan
Projects
None yet
Development

No branches or pull requests

2 participants