diff --git a/platform/darwin/src/MLNPluginLayer.h b/platform/darwin/src/MLNPluginLayer.h index b188e4fb2..2e977b8d0 100644 --- a/platform/darwin/src/MLNPluginLayer.h +++ b/platform/darwin/src/MLNPluginLayer.h @@ -80,6 +80,9 @@ typedef struct MLNPluginLayerDrawingContext { CGFloat fieldOfView; /// A 4×4 matrix representing the map view’s current projection state. MLNMatrix4 projectionMatrix; + /// A 4×4 matrix representing the map view’s current near clip projection state. + MLNMatrix4 nearClippedProjMatrix; + } MLNPluginLayerDrawingContext; MLN_EXPORT diff --git a/platform/ios/src/MLNMapView.mm b/platform/ios/src/MLNMapView.mm index 1337f0c6b..483486974 100644 --- a/platform/ios/src/MLNMapView.mm +++ b/platform/ios/src/MLNMapView.mm @@ -7748,11 +7748,8 @@ static void *windowScreenContext = &windowScreenContext; drawingContext.direction = mbgl::util::rad2deg(-state.getBearing()); drawingContext.pitch = state.getPitch(); drawingContext.fieldOfView = state.getFieldOfView(); - mbgl::mat4 projMatrix; - state.getProjMatrix(projMatrix); - drawingContext.projectionMatrix = MLNMatrix4Make(projMatrix); - - //NSLog(@"Rendering"); + drawingContext.projectionMatrix = MLNMatrix4Make(paintParameters.transformParams.projMatrix); + drawingContext.nearClippedProjMatrix = MLNMatrix4Make(paintParameters.transformParams.nearClippedProjMatrix); // Call update with the scene state variables [weakPlugInLayer onUpdateLayer:drawingContext];