1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Fix tessellation of Shape::Vec of heterogenous TextureId:s (#1445)

Closes https://github.com/emilk/egui/issues/1443
This commit is contained in:
Emil Ernerfeldt
2022-04-03 18:14:27 +02:00
committed by GitHub
parent c2039920de
commit 10f30a0c52
7 changed files with 114 additions and 64 deletions

View File

@@ -64,6 +64,7 @@ impl Shadow {
use crate::tessellator::*;
let rect = RectShape::filled(rect.expand(half_ext), ext_rounding, color);
let pixels_per_point = 1.0; // doesn't matter here
let font_tex_size = [1; 2]; // unused size we are not tessellating text.
let mut tessellator = Tessellator::new(
pixels_per_point,
TessellationOptions {
@@ -71,6 +72,7 @@ impl Shadow {
feathering_size_in_pixels: extrusion * pixels_per_point,
..Default::default()
},
font_tex_size,
);
let mut mesh = Mesh::default();
tessellator.tessellate_rect(&rect, &mut mesh);