egui/epaint
Emil Ernerfeldt 7b18fab7a4
Optimize tessellation of filled circles (#1616)
When painting a scatter plot we sometimes want to paint hundreds of thousands of points (filled circles) on screen every frame.

In this PR the font texture atlas is pre-populated with some filled circled of various radii. These are then used when painting (small) filled circled, which means A LOT less triangles and vertices are generated for them.

In a new benchmark we can see a 10x speedup in circle tessellation, but the the real benefit comes in the painting of these circles: since we generate a lot less vertices, the backend painter has less to do.

In a real-life scenario with a lot of things being painted (including around 100k points) I saw tessellation go from 35ms -> 7ms and painting go from 45ms -> 1ms. This means the total frame time went from 80ms to 8ms, or a 10x speedup.
2022-05-10 19:31:19 +02:00
..
benches Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
fonts Replace ProggyClean.ttf with Hack-Regular.ttf as default monospace font (#802) 2021-10-17 20:49:28 +02:00
src Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
Cargo.toml Release 0.18.1 of egui & epaint - Change Shape::Callback to &mut dyn Any (#1552) 2022-05-01 11:35:29 +02:00
CHANGELOG.md Optimize tessellation of filled circles (#1616) 2022-05-10 19:31:19 +02:00
README.md Rename Egui to egui 2021-01-17 14:48:59 +01:00

epaint - egui paint library

A bare-bones 2D graphics library for turning simple 2D shapes and text into textured triangles.

Made for egui.