I would like to do the same thing than https://www.mapbox.com/blog/mapbox-unity/ but with three.js in a XWalk view.
In short, as I understand it, the mapbox plugin is a controller which has access to the OpenGL context of a Mapbox view and to the OpenGL context of a Unity view. Then the plugin does a render to texture of map in the Unity OpenGL context.
In my case I dont use Unity but Three.js. I see a way to do this by sharing the OpenGL context from WebGL to another OpenGL context from another activity. It would need to:
- expose an OpenGL context from webGL via a binding betwwen Blink and XWalk
- use a XWalk Java extension to share a texture buffer from the OpenGL context to another activity.
Important notes:
- aimed plaforms: iOS, Android, (As MapboxGL does not support Windows (using D3D) a guard will prevent running on D3D platform such as Windows phone.)
- mapboxGL-JS is not an option as I need offline map and other native only features.