Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d56f2ac

Browse files
committedFeb 15, 2020
Updated meshes example to compile.
1 parent 00b39eb commit d56f2ac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎rendy/examples/meshes/main.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use {
1313
graph::{render::*, GraphBuilder, GraphContext, NodeBuffer, NodeImage},
1414
hal::{self, adapter::PhysicalDevice as _, device::Device as _},
1515
init::winit::{
16+
dpi::LogicalSize,
1617
event::{Event, WindowEvent},
1718
event_loop::{ControlFlow, EventLoop},
1819
window::WindowBuilder,
@@ -369,7 +370,7 @@ fn main() {
369370

370371
let event_loop = EventLoop::new();
371372
let window = WindowBuilder::new()
372-
.with_inner_size((960, 640).into())
373+
.with_inner_size(Into::<LogicalSize<u32>>::into((960, 640)))
373374
.with_title("Rendy example");
374375

375376
let config: Config = Default::default();
@@ -379,7 +380,7 @@ fn main() {
379380

380381
let mut graph_builder = GraphBuilder::<_, Scene<_>>::new();
381382

382-
let size = window.inner_size().to_physical(window.hidpi_factor());
383+
let size = window.inner_size();
383384
let window_kind = hal::image::Kind::D2(size.width as u32, size.height as u32, 1, 1);
384385
let aspect = size.width / size.height;
385386

@@ -500,7 +501,7 @@ fn main() {
500501
WindowEvent::CloseRequested => *control_flow = ControlFlow::Exit,
501502
_ => {}
502503
},
503-
Event::EventsCleared => {
504+
Event::MainEventsCleared => {
504505
factory.maintain(&mut families);
505506
if let Some(ref mut graph) = graph {
506507
graph.run(&mut factory, &mut families, &scene);

0 commit comments

Comments
 (0)
Please sign in to comment.