Skip to content

Commit

Permalink
Cover edge case of missing image for pattern fill
Browse files Browse the repository at this point in the history
Signed-off-by: Iván Sánchez Ortega <[email protected]>
  • Loading branch information
IvanSanchez committed Mar 28, 2023
1 parent cfa1086 commit 33dc7fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/render/draw_fill_extrusion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ function drawExtrusionTiles(
const programConfiguration = bucket.programConfigurations.get(layer.id);
const program = painter.useProgram(image ? 'fillExtrusionPattern' : 'fillExtrusion', programConfiguration);

if (image) {
// Extrusion will use a texture if there's a pattern image and an
// atlas. It's possible to have an image but no atlas, in the case of
// missing (mis-named) pattern images
if (image && tile.imageAtlasTexture) {
painter.context.activeTexture.set(gl.TEXTURE0);
tile.imageAtlasTexture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE);
programConfiguration.updatePaintBuffers(crossfade);
Expand Down

0 comments on commit 33dc7fe

Please sign in to comment.