Added the nearClippedProjMatrix to the drawing context (#3599)

Co-authored-by: “Malcolm <“mtoon@atlasprogramming.com”>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
This commit is contained in:
AtlasProgramming
2025-07-04 15:52:12 -04:00
committed by GitHub
parent 2f61796299
commit 617de029fa
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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];