pub fn build(&self, device: Device) -> VdResult<Framebuffer> {
        let render_pass = self.render_pass.cloned()
            .expect("unable to create framebuffer: no render pass specified");
        let attachments = self.attachments.as_ref()
            .expect("unable to create framebuffer: no attachments specified")
            .iter().map(|&att| att.clone()).collect();
        let attachment_handles: SmallVec<[_; 8]> = self.attachments.as_ref().unwrap()
            .iter().map(|&att| att.handle()).collect();

        let mut create_info = self.create_info.clone();
        create_info.set_attachments(&attachment_handles);
        let handle = unsafe { device.create_framebuffer(&create_info, None)? };

        Ok(Framebuffer {
            inner: Arc::new(Inner {
                handle,
                device,
                render_pass,
                attachments,
            })
        })
    }
/// Creates and returns a new `Framebuffer`
Creates and returns a new `Framebuffer`
Creates and returns a new ` Framebuffer `
pub fn build(&self, device: Device) -> VdResult<Framebuffer> {
        let render_pass = self.render_pass.cloned()
            .expect("unable to create framebuffer: no render pass specified");
        let attachments = self.attachments.as_ref()
            .expect("unable to create framebuffer: no attachments specified")
            .iter().map(|&att| att.clone()).collect();
        let attachment_handles: SmallVec<[_; 8]> = self.attachments.as_ref().unwrap()
            .iter().map(|&att| att.handle()).collect();
        let mut create_info = self.create_info.clone();
        create_info.set_attachments(&attachment_handles);
        let handle = unsafe { device.create_framebuffer(&create_info, None)? };
        Ok(Framebuffer {
            inner: Arc::new(Inner {
                handle,
                device,
                render_pass,
                attachments,
            })
        })
    }
pub fn build ( & self , device : Device ) -> VdResult < Framebuffer > { let render_pass = self . render_pass . cloned ( ) . expect ( " " ) ; let attachments = self . attachments . as_ref ( ) . expect ( " " ) . iter ( ) . map ( | & att | att . clone ( ) ) . collect ( ) ; let attachment_handles : SmallVec < [ _ ; 8 ] > = self . attachments . as_ref ( ) . unwrap ( ) . iter ( ) . map ( | & att | att . handle ( ) ) . collect ( ) ; let mut create_info = self . create_info . clone ( ) ; create_info . set_attachments ( & attachment_handles ) ; let handle = unsafe { device . create_framebuffer ( & create_info , None ) ? } ; Ok ( Framebuffer { inner : Arc :: new ( Inner { handle , device , render_pass , attachments , } ) } ) }
Creates and returns a new `Framebuffer`
Creates and returns a new ` Framebuffer `
&self
device
Device
&self
device
Device