[glium] update to latest glium with EventLoop and vsync
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -42,6 +42,7 @@ pub mod widgets;
|
||||
pub use {
|
||||
containers::*,
|
||||
context::Context,
|
||||
examples::ExampleApp,
|
||||
id::Id,
|
||||
input::*,
|
||||
layers::*,
|
||||
|
||||
Reference in New Issue
Block a user