Fix bug when debug-painting clip rectangles

This commit is contained in:
Emil Ernerfeldt 2022-02-19 20:18:27 +01:00
parent aa53522179
commit 3a5ec4733f

View file

@ -1026,6 +1026,7 @@ pub fn tessellate_shapes(
if options.debug_paint_clip_rects { if options.debug_paint_clip_rects {
for ClippedMesh(clip_rect, mesh) in &mut clipped_meshes { for ClippedMesh(clip_rect, mesh) in &mut clipped_meshes {
if mesh.texture_id == TextureId::default() {
tessellator.clip_rect = Rect::EVERYTHING; tessellator.clip_rect = Rect::EVERYTHING;
tessellator.tessellate_shape( tessellator.tessellate_shape(
tex_size, tex_size,
@ -1036,6 +1037,9 @@ pub fn tessellate_shapes(
), ),
mesh, mesh,
); );
} else {
// TODO: create a new `ClippedMesh` just for the painted clip rectangle
}
} }
} }