Fix bug when debug-painting clip rectangles
This commit is contained in:
parent
aa53522179
commit
3a5ec4733f
1 changed files with 14 additions and 10 deletions
|
@ -1026,16 +1026,20 @@ 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 {
|
||||||
tessellator.clip_rect = Rect::EVERYTHING;
|
if mesh.texture_id == TextureId::default() {
|
||||||
tessellator.tessellate_shape(
|
tessellator.clip_rect = Rect::EVERYTHING;
|
||||||
tex_size,
|
tessellator.tessellate_shape(
|
||||||
Shape::rect_stroke(
|
tex_size,
|
||||||
*clip_rect,
|
Shape::rect_stroke(
|
||||||
0.0,
|
*clip_rect,
|
||||||
Stroke::new(2.0, Color32::from_rgb(150, 255, 150)),
|
0.0,
|
||||||
),
|
Stroke::new(2.0, Color32::from_rgb(150, 255, 150)),
|
||||||
mesh,
|
),
|
||||||
);
|
mesh,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// TODO: create a new `ClippedMesh` just for the painted clip rectangle
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue