@@ -4,8 +4,8 @@ use wgpu_bootstrap::{
44 runner:: App ,
55 util:: orbit_camera:: { CameraUniform , OrbitCamera } ,
66 wgpu:: { self , util:: DeviceExt , TextureView } ,
7- winit:: event:: Event ,
87} ;
8+ use winit:: event:: { DeviceEvent , WindowEvent } ;
99
1010#[ repr( C ) ]
1111#[ derive( Copy , Clone , Debug , bytemuck:: Pod , bytemuck:: Zeroable ) ]
@@ -210,6 +210,7 @@ impl CubeApp {
210210 module : & shader,
211211 entry_point : "vs_main" ,
212212 buffers : & [ Vertex :: desc ( ) ] ,
213+ compilation_options : wgpu:: PipelineCompilationOptions :: default ( ) ,
213214 } ,
214215 fragment : Some ( wgpu:: FragmentState {
215216 module : & shader,
@@ -219,6 +220,7 @@ impl CubeApp {
219220 blend : Some ( wgpu:: BlendState :: REPLACE ) ,
220221 write_mask : wgpu:: ColorWrites :: ALL ,
221222 } ) ] ,
223+ compilation_options : wgpu:: PipelineCompilationOptions :: default ( ) ,
222224 } ) ,
223225 primitive : wgpu:: PrimitiveState {
224226 topology : wgpu:: PrimitiveTopology :: TriangleList ,
@@ -245,6 +247,7 @@ impl CubeApp {
245247 alpha_to_coverage_enabled : false ,
246248 } ,
247249 multiview : None ,
250+ cache : None ,
248251 } ) ;
249252
250253 let mut camera = OrbitCamera :: new (
@@ -270,8 +273,12 @@ impl CubeApp {
270273}
271274
272275impl App for CubeApp {
273- fn input ( & mut self , context : & mut Context , event : & Event < ( ) > ) {
274- self . camera . process_events ( context, event)
276+ fn window_event ( & mut self , context : & mut Context , event : & WindowEvent ) -> bool {
277+ return self . camera . window_event ( context, event) ;
278+ }
279+
280+ fn device_event ( & mut self , context : & mut Context , event : & DeviceEvent ) -> bool {
281+ return self . camera . device_event ( context, event) ;
275282 }
276283
277284 fn render ( & mut self , context : & mut Context , view : & TextureView ) {
@@ -295,17 +302,19 @@ impl App for CubeApp {
295302 b : 1.0 ,
296303 a : 1.0 ,
297304 } ) ,
298- store : true ,
305+ store : wgpu :: StoreOp :: Store ,
299306 } ,
300307 } ) ] ,
301308 depth_stencil_attachment : Some ( wgpu:: RenderPassDepthStencilAttachment {
302309 view : context. depth_texture_view ( ) ,
303310 depth_ops : Some ( wgpu:: Operations {
304311 load : wgpu:: LoadOp :: Clear ( 1.0 ) ,
305- store : true ,
312+ store : wgpu :: StoreOp :: Store ,
306313 } ) ,
307314 stencil_ops : None ,
308315 } ) ,
316+ occlusion_query_set : None ,
317+ timestamp_writes : None ,
309318 } ) ;
310319
311320 render_pass. set_pipeline ( & self . render_pipeline ) ;
0 commit comments