diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-06 08:06:12 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-12 14:48:22 -0700 |
commit | 358b0305ae1f52b477ae145bcca4b7af242dd5c3 (patch) | |
tree | f5b1315e650079fce12130611896836e1c8cfa98 /src/mbgl/renderer/painter.cpp | |
parent | c61041b44cd9181641db2351f4657cc356300226 (diff) | |
download | qtlocation-mapboxgl-358b0305ae1f52b477ae145bcca4b7af242dd5c3.tar.gz |
[core] Per-segment-per-layer vertex arrays
Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
Diffstat (limited to 'src/mbgl/renderer/painter.cpp')
-rw-r--r-- | src/mbgl/renderer/painter.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp index 35d03e7cb4..9ab50e83b0 100644 --- a/src/mbgl/renderer/painter.cpp +++ b/src/mbgl/renderer/painter.cpp @@ -316,16 +316,23 @@ void Painter::renderPass(PaintParameters& parameters, const Properties<>::PossiblyEvaluated properties; parameters.programs.extrusionTexture.draw( - context, gl::Triangles(), gl::DepthMode::disabled(), gl::StencilMode::disabled(), + context, + gl::Triangles(), + gl::DepthMode::disabled(), + gl::StencilMode::disabled(), colorModeForRenderPass(), ExtrusionTextureProgram::UniformValues{ uniforms::u_matrix::Value{ viewportMat }, uniforms::u_world::Value{ size }, uniforms::u_image::Value{ 0 }, uniforms::u_opacity::Value{ layer.as<RenderFillExtrusionLayer>() ->evaluated.get<FillExtrusionOpacity>() } }, - extrusionTextureVertexBuffer, quadTriangleIndexBuffer, extrusionTextureSegments, - ExtrusionTextureProgram::PaintPropertyBinders{ properties, 0 }, properties, - state.getZoom()); + extrusionTextureVertexBuffer, + quadTriangleIndexBuffer, + extrusionTextureSegments, + ExtrusionTextureProgram::PaintPropertyBinders{ properties, 0 }, + properties, + state.getZoom(), + layer.getID()); } else { renderItem(parameters, item); } |