diff options
-rw-r--r-- | examples/integration_opengl/src/main.rs | 3 | ||||
-rw-r--r-- | examples/integration_opengl/src/scene.rs | 2 | ||||
-rw-r--r-- | lazy/src/component.rs | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/examples/integration_opengl/src/main.rs b/examples/integration_opengl/src/main.rs index 3b63f22e..551aba67 100644 --- a/examples/integration_opengl/src/main.rs +++ b/examples/integration_opengl/src/main.rs @@ -73,8 +73,9 @@ pub fn main() { ); let mut resized = false; + let scene = Scene::new(&gl, &shader_version); + event_loop.run(move |event, _, control_flow| { - let scene = Scene::new(&gl, &shader_version); *control_flow = ControlFlow::Wait; match event { diff --git a/examples/integration_opengl/src/scene.rs b/examples/integration_opengl/src/scene.rs index ccca0d29..a1245bf2 100644 --- a/examples/integration_opengl/src/scene.rs +++ b/examples/integration_opengl/src/scene.rs @@ -86,6 +86,8 @@ impl Scene { pub fn draw(&self, gl: &glow::Context) { unsafe { + gl.bind_vertex_array(Some(self.vertex_array)); + gl.use_program(Some(self.program)); gl.draw_arrays(glow::TRIANGLES, 0, 3); } } diff --git a/lazy/src/component.rs b/lazy/src/component.rs index 787adc10..fd3f6ff7 100644 --- a/lazy/src/component.rs +++ b/lazy/src/component.rs @@ -149,6 +149,8 @@ where ) }); + local_shell.with_invalid_layout(|| shell.invalidate_layout()); + if !local_messages.is_empty() { let mut component = self .state @@ -373,6 +375,8 @@ where }) .unwrap_or_else(|| iced_native::event::Status::Ignored); + local_shell.with_invalid_layout(|| shell.invalidate_layout()); + if !local_messages.is_empty() { let mut component = self.instance.state.take().unwrap().into_heads().component; |