fn window_size_dependent_setup(
    images: &[Arc<SwapchainImage<()>>],
    render_pass: Arc<dyn RenderPassAbstract + Send + Sync>,
    dynamic_state: &mut DynamicState,
) -> Vec<Arc<dyn FramebufferAbstract + Send + Sync>> {
    let dimensions = images[0].dimensions();

    let viewport = Viewport {
        origin: [0.0, 0.0],
        dimensions: [dimensions[0] as f32, dimensions[1] as f32],
        depth_range: 0.0..1.0,
    };
    dynamic_state.viewports = Some(vec![viewport]);

    images
        .iter()
        .map(|image| {
            Arc::new(
                Framebuffer::start(render_pass.clone())
                    .add(image.clone())
                    .unwrap()
                    .build()
                    .unwrap(),
            ) as Arc<dyn FramebufferAbstract + Send + Sync>
        })
        .collect::<Vec<_>>()
}
/// This method is called once during initialization, then again whenever the window is resized
This method is called once during initialization, then again whenever the window is resized
This method is called once during initialization then again whenever the window is resized
fn window_size_dependent_setup(
    images: &[Arc<SwapchainImage<()>>],
    render_pass: Arc<dyn RenderPassAbstract + Send + Sync>,
    dynamic_state: &mut DynamicState,
) -> Vec<Arc<dyn FramebufferAbstract + Send + Sync>> {
    let dimensions = images[0].dimensions();
    let viewport = Viewport {
        origin: [0.0, 0.0],
        dimensions: [dimensions[0] as f32, dimensions[1] as f32],
        depth_range: 0.0..1.0,
    };
    dynamic_state.viewports = Some(vec![viewport]);
    images
        .iter()
        .map(|image| {
            Arc::new(
                Framebuffer::start(render_pass.clone())
                    .add(image.clone())
                    .unwrap()
                    .build()
                    .unwrap(),
            ) as Arc<dyn FramebufferAbstract + Send + Sync>
        })
        .collect::<Vec<_>>()
}
fn window_size_dependent_setup ( images : & [ Arc < SwapchainImage < ( ) > > ] , render_pass : Arc < dyn RenderPassAbstract + Send + Sync > , dynamic_state : & mut DynamicState , ) -> Vec < Arc < dyn FramebufferAbstract + Send + Sync > > { let dimensions = images [ 0 ] . dimensions ( ) ; let viewport = Viewport { origin : [ 0.0 , 0.0 ] , dimensions : [ dimensions [ 0 ] as f32 , dimensions [ 1 ] as f32 ] , depth_range : 0.0 .. 1.0 , } ; dynamic_state . viewports = Some ( vec ! [ viewport ] ) ; images . iter ( ) . map ( | image | { Arc :: new ( Framebuffer :: start ( render_pass . clone ( ) ) . add ( image . clone ( ) ) . unwrap ( ) . build ( ) . unwrap ( ) , ) as Arc < dyn FramebufferAbstract + Send + Sync > } ) . collect :: < Vec < _ > > ( ) }
This method is called once during initialization, then again whenever the window is resized
This method is called once during initialization then again whenever the window is resized
images
&[Arc<SwapchainImage<()>>]
render_pass
Arc<dyn RenderPassAbstract + Send + Sync>
dynamic_state
&mut DynamicState
images
&[Arc<SwapchainImage<()>>]
render_pass
Arc<dyn RenderPassAbstract + Send + Sync>
dynamic_state
&mut DynamicState