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:
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user