[glium] update to latest glium with EventLoop and vsync

This commit is contained in:
Emil Ernerfeldt
2020-07-22 00:36:17 +02:00
parent 6b6545958d
commit 9b9cd01c5c
10 changed files with 562 additions and 274 deletions
+1
View File
@@ -95,6 +95,7 @@ Add extremely quick animations for some things, maybe 2-3 frames. For instance:
* [ ] Draw as flame graph
* [ ] Draw as hotmap
* [ ] Change `width.min(max_width)` to `width.at_most(max_width)`
* [ ] Egui icon
### Names and structure
* [ ] Rename things to be more consistent with Dear ImGui
+16
View File
@@ -37,6 +37,22 @@ pub struct RawInput {
pub events: Vec<Event>,
}
impl RawInput {
/// Helper: move volatile (deltas and events), clone the rest
pub fn take(&mut self) -> RawInput {
RawInput {
mouse_down: self.mouse_down,
mouse_pos: self.mouse_pos,
scroll_delta: std::mem::take(&mut self.scroll_delta),
screen_size: self.screen_size,
pixels_per_point: self.pixels_per_point,
time: self.time,
seconds_since_midnight: self.seconds_since_midnight,
events: std::mem::take(&mut self.events),
}
}
}
/// What egui maintains
#[derive(Clone, Debug, Default)]
pub struct InputState {
+1
View File
@@ -42,6 +42,7 @@ pub mod widgets;
pub use {
containers::*,
context::Context,
examples::ExampleApp,
id::Id,
input::*,
layers::*,