Skip to content

Seeking example: Render map into an existing webgl context (regl-worldview) #1345

@inactivist

Description

@inactivist

(Not sure if this is the appropriate place to ask this kind of question, please let me know if there's a more appropriate venue.)

I'm looking for examples showing how to render the map inside an existing WebGL context, with other rendered WebGL elements visible above the map.

In my case, I'm working with an existing app that uses regl-worldview to render various elements as children of WorldView, so that is something I can't change. I want to render the map into the XY plane of the Worldview, as if it's a floor texture.

I see StaticMap allows passing an existing context in the gl property, and I've played around with that a bit without much luck. Digging into streetscape.gl, I see that it renders a StaticMap as a child of Core3DViewer -> DeckGL components, so assume there's a level of compatibility between these two libraries.

Has anyone seen such an example, or if it's a sensible goal?

In case it's not obvious, I'm a bit of a newbie when it comes to react-map-gl and MapBox. Same for WebGL (have experience with threejs but that's about it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions