diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-04-04 15:08:16 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-04-05 18:04:25 -0700 |
commit | dc495e1c9d831ccf928381845ffcb409c5d91271 (patch) | |
tree | fb32b19f15a9ab4421bf11ef275eacc5847fe721 /src/mbgl/renderer | |
parent | 275d753e91501345e00c23166f0c67ccf8741155 (diff) | |
download | qtlocation-mapboxgl-dc495e1c9d831ccf928381845ffcb409c5d91271.tar.gz |
[core] Add Projection matrix to CustomLayerRenderParameters to transform web mercator world coordinates to GL coordinates.
Diffstat (limited to 'src/mbgl/renderer')
-rw-r--r-- | src/mbgl/renderer/layers/render_custom_layer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/renderer/layers/render_custom_layer.cpp b/src/mbgl/renderer/layers/render_custom_layer.cpp index 85ca5b074e..be9f64d9eb 100644 --- a/src/mbgl/renderer/layers/render_custom_layer.cpp +++ b/src/mbgl/renderer/layers/render_custom_layer.cpp @@ -6,6 +6,7 @@ #include <mbgl/style/layers/custom_layer_impl.hpp> #include <mbgl/map/transform_state.hpp> #include <mbgl/gl/gl.hpp> +#include <mbgl/util/mat4.hpp> namespace mbgl { @@ -72,6 +73,9 @@ void RenderCustomLayer::render(PaintParameters& paintParameters, RenderSource*) parameters.bearing = -state.getAngle() * util::RAD2DEG; parameters.pitch = state.getPitch(); parameters.fieldOfView = state.getFieldOfView(); + mat4 projMatrix; + state.getProjMatrix(projMatrix); + parameters.projectionMatrix = projMatrix; MBGL_CHECK_ERROR(host->render(parameters)); |