diff --git a/emigui/README.md b/emigui/README.md index 3fe020a2..a6e00051 100644 --- a/emigui/README.md +++ b/emigui/README.md @@ -84,7 +84,7 @@ Add extremely quick animations for some things, maybe 2-3 frames. For instance: ### Names and structure * [ ] Rename things to be more consistent with Dear ImGui -* [ ] Combine Emigui and Context? +* [x] Combine Emigui and Context? * [ ] Solve which parts of Context are behind a mutex * [ ] All of Context behind one mutex? * [ } Break up Context into Input, State, Output ? diff --git a/emigui/src/context.rs b/emigui/src/context.rs index fad63cf4..6cfd1dfd 100644 --- a/emigui/src/context.rs +++ b/emigui/src/context.rs @@ -4,6 +4,14 @@ use parking_lot::Mutex; use crate::{layout::align_rect, *}; +#[derive(Clone, Copy, Default)] +struct PaintStats { + num_batches: usize, + num_primitives: usize, + num_vertices: usize, + num_triangles: usize, +} + /// Contains the input, style and output of all GUI commands. /// Regions keep an Arc pointer to this. /// This allows us to create several child regions at once, @@ -11,10 +19,11 @@ use crate::{layout::align_rect, *}; pub struct Context { /// The default style for new regions style: Mutex