[core] Don't crash when attribute count is exceeded
This commit is contained in:
committed by
Lauren Budorick
parent
f6da3ba9be
commit
c3346f473a
@@ -58,24 +58,32 @@ void RenderImageSource::finishRender(PaintParameters& parameters) {
|
||||
static const style::Properties<>::PossiblyEvaluated properties {};
|
||||
static const DebugProgram::PaintPropertyBinders paintAttributeData(properties, 0);
|
||||
|
||||
auto& programInstance = parameters.programs.debug;
|
||||
|
||||
for (auto matrix : matrices) {
|
||||
parameters.programs.debug.draw(
|
||||
programInstance.draw(
|
||||
parameters.context,
|
||||
gl::LineStrip { 4.0f * parameters.pixelRatio },
|
||||
gl::DepthMode::disabled(),
|
||||
gl::StencilMode::disabled(),
|
||||
gl::ColorMode::unblended(),
|
||||
DebugProgram::UniformValues {
|
||||
uniforms::u_matrix::Value{ matrix },
|
||||
uniforms::u_color::Value{ Color::red() }
|
||||
},
|
||||
parameters.staticData.tileVertexBuffer,
|
||||
parameters.staticData.tileBorderIndexBuffer,
|
||||
parameters.staticData.tileBorderSegments,
|
||||
paintAttributeData,
|
||||
properties,
|
||||
parameters.state.getZoom(),
|
||||
"debug"
|
||||
programInstance.computeAllUniformValues(
|
||||
DebugProgram::UniformValues {
|
||||
uniforms::u_matrix::Value{ matrix },
|
||||
uniforms::u_color::Value{ Color::red() }
|
||||
},
|
||||
paintAttributeData,
|
||||
properties,
|
||||
parameters.state.getZoom()
|
||||
),
|
||||
programInstance.computeAllAttributeBindings(
|
||||
parameters.staticData.tileVertexBuffer,
|
||||
paintAttributeData,
|
||||
properties
|
||||
),
|
||||
"image"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user