summaryrefslogtreecommitdiffstats
path: root/examples/integration_opengl/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/integration_opengl/src')
-rw-r--r--examples/integration_opengl/src/controls.rs8
-rw-r--r--examples/integration_opengl/src/main.rs18
2 files changed, 13 insertions, 13 deletions
diff --git a/examples/integration_opengl/src/controls.rs b/examples/integration_opengl/src/controls.rs
index fa5aa91d..f387b4e5 100644
--- a/examples/integration_opengl/src/controls.rs
+++ b/examples/integration_opengl/src/controls.rs
@@ -1,9 +1,7 @@
use iced_glow::Renderer;
-use iced_glutin::slider;
-use iced_glutin::{
- Alignment, Color, Column, Command, Element, Length, Program, Row, Slider,
- Text,
-};
+use iced_glutin::widget::slider::{self, Slider};
+use iced_glutin::widget::{Column, Row, Text};
+use iced_glutin::{Alignment, Color, Command, Element, Length, Program};
pub struct Controls {
background_color: Color,
diff --git a/examples/integration_opengl/src/main.rs b/examples/integration_opengl/src/main.rs
index f80915d2..3b63f22e 100644
--- a/examples/integration_opengl/src/main.rs
+++ b/examples/integration_opengl/src/main.rs
@@ -68,7 +68,6 @@ pub fn main() {
let mut state = program::State::new(
controls,
viewport.logical_size(),
- conversion::cursor_position(cursor_position, viewport.scale_factor()),
&mut renderer,
&mut debug,
);
@@ -160,16 +159,19 @@ pub fn main() {
}
// And then iced on top
- let mouse_interaction = renderer.backend_mut().draw(
- &gl,
- &viewport,
- state.primitive(),
- &debug.overlay(),
- );
+ renderer.with_primitives(|backend, primitive| {
+ backend.present(
+ &gl,
+ primitive,
+ &viewport,
+ &debug.overlay(),
+ );
+ });
+
// Update the mouse cursor
windowed_context.window().set_cursor_icon(
iced_winit::conversion::mouse_interaction(
- mouse_interaction,
+ state.mouse_interaction(),
),
);