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 has been archived by the owner on Aug 8, 2023. It is now read-only.
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.
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 theGLKView.context
property into+[SCNRenderer rendererWithContext:options:]
.mapbox-gl-native/platform/ios/src/MGLMapView.mm
Line 202 in 6f0c992
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 returningself.style.mapView.glView.context
.MGLMapView.glView
’s declaration would need to be moved to MGLMapView_Private.h./cc @fabian-guerra @jmkiley
The text was updated successfully, but these errors were encountered: