mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.35k stars 1.33k forks source link

Render into OpenGL framebuffer #16565

Open feliwir opened 3 years ago

feliwir commented 3 years ago

Platform: Cross-Platform C++ Mapbox SDK version: v1.6.0

Hello everyone. I'm having trouble rendering into an existing OpenGL Framebuffer (a context does already exist aswell), with the mapbox sdk. I've tried using the mbgl::HeadlessFrontend, however that class still tries to take control of my OpenGL context (everything goes black after the initial rendering). Also I'd like to keep control of the application loop and just call render/update each tick. So here is my question: How can i render a map into an existing OpenGL framebuffer & context. Thanks for your guidance in advance.