mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Add benchmark for text layout and tesselation
This commit is contained in:
@@ -45,6 +45,13 @@ impl Mesh {
|
||||
}
|
||||
}
|
||||
|
||||
/// Restore to default state, but without freeing memory.
|
||||
pub fn clear(&mut self) {
|
||||
self.indices.clear();
|
||||
self.vertices.clear();
|
||||
self.vertices = Default::default();
|
||||
}
|
||||
|
||||
pub fn bytes_used(&self) -> usize {
|
||||
std::mem::size_of::<Self>()
|
||||
+ self.vertices.len() * std::mem::size_of::<Vertex>()
|
||||
|
||||
Reference in New Issue
Block a user