Ensure that path windings are rendered to the right atlas texture

Fixes #5
This commit is contained in:
Max Brunsfeld 2021-03-31 14:51:51 -07:00
parent a9c428ad05
commit 2efc90adc6

View file

@ -164,15 +164,17 @@ impl Renderer {
}, },
}); });
if current_atlas_id.map_or(false, |current_atlas_id| atlas_id != current_atlas_id) { if let Some(current_atlas_id) = current_atlas_id {
if atlas_id != current_atlas_id {
self.render_path_stencils_for_atlas( self.render_path_stencils_for_atlas(
offset, offset,
&vertices, &vertices,
atlas_id, current_atlas_id,
command_buffer, command_buffer,
); );
vertices.clear(); vertices.clear();
} }
}
current_atlas_id = Some(atlas_id); current_atlas_id = Some(atlas_id);