13
13
graph:: { render:: * , GraphBuilder , GraphContext , NodeBuffer , NodeImage } ,
14
14
hal:: { self , adapter:: PhysicalDevice as _, device:: Device as _} ,
15
15
init:: winit:: {
16
+ dpi:: LogicalSize ,
16
17
event:: { Event , WindowEvent } ,
17
18
event_loop:: { ControlFlow , EventLoop } ,
18
19
window:: WindowBuilder ,
@@ -369,7 +370,7 @@ fn main() {
369
370
370
371
let event_loop = EventLoop :: new ( ) ;
371
372
let window = WindowBuilder :: new ( )
372
- . with_inner_size ( ( 960 , 640 ) . into ( ) )
373
+ . with_inner_size ( Into :: < LogicalSize < u32 > > :: into ( ( 960 , 640 ) ) )
373
374
. with_title ( "Rendy example" ) ;
374
375
375
376
let config: Config = Default :: default ( ) ;
@@ -379,7 +380,7 @@ fn main() {
379
380
380
381
let mut graph_builder = GraphBuilder :: <_, Scene <_>>:: new( ) ;
381
382
382
- let size = window. inner_size( ) . to_physical ( window . hidpi_factor ( ) ) ;
383
+ let size = window. inner_size( ) ;
383
384
let window_kind = hal:: image:: Kind :: D2 ( size. width as u32 , size. height as u32 , 1 , 1 ) ;
384
385
let aspect = size. width / size. height;
385
386
@@ -500,7 +501,7 @@ fn main() {
500
501
WindowEvent :: CloseRequested => * control_flow = ControlFlow :: Exit ,
501
502
_ => { }
502
503
} ,
503
- Event :: EventsCleared => {
504
+ Event :: MainEventsCleared => {
504
505
factory. maintain( & mut families) ;
505
506
if let Some ( ref mut graph) = graph {
506
507
graph. run( & mut factory, & mut families, & scene) ;
0 commit comments