You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Expose EAGLContext to MGLOpenGLStyleLayer subclasses #12945
MGLOpenGLStyleLayer should have a read-only EAGLContext property of type EAGLContext.
As seen in mapbox/ios-sdk-examples#111 (comment), it’s possible to integrate an SCNRenderer into an MGLOpenGLStyleLayer in order to render 3D SceneKit content into a style layer. However, it currently requires forward-declaring the MGLMapView.glView property, which is of type GLKView, so that an MGLOpenGLStyleLayer subclass can pass the GLKView.context property into +[SCNRenderer rendererWithContext:options:].
MGLMapView.glView is an implementation detail that under ordinary circumstances shouldn’t be exposed to developers, especially not in light of a future Metal migration. However, MGLOpenGLStyleLayer is all about exposing OpenGL ES–specific implementation details, so it should have access to its EAGLContext.
The implementation of MGLOpenGLStyleLayer.EAGLContext would consist of returning self.style.mapView.glView.context. MGLMapView.glView’s declaration would need to be moved to MGLMapView_Private.h.
Activity