pub fn from(vformats: &[VertexFormat]) -> Self {
        let mut vl = Self::empty();

        for vfmt in vformats {
            vl.wgpu_attrs.push(wgpu::VertexAttribute {
                shader_location: vl.wgpu_attrs.len() as u32,
                offset: vl.size as wgpu::BufferAddress,
                format: vfmt.to_wgpu(),
            });
            vl.size += vfmt.bytesize();
        }
        log::debug!("Vertex layout: {:?}", vl);
        vl
    }
/// Convert from an array of VertexFormat to a VertexLayout
Convert from an array of VertexFormat to a VertexLayout
Convert from an array of VertexFormat to a VertexLayout
pub fn from(vformats: &[VertexFormat]) -> Self {
        let mut vl = Self::empty();
        for vfmt in vformats {
            vl.wgpu_attrs.push(wgpu::VertexAttribute {
                shader_location: vl.wgpu_attrs.len() as u32,
                offset: vl.size as wgpu::BufferAddress,
                format: vfmt.to_wgpu(),
            });
            vl.size += vfmt.bytesize();
        }
        log::debug!("Vertex layout: {:?}", vl);
        vl
    }
pub fn from ( vformats : & [ VertexFormat ] ) -> Self { let mut vl = Self :: empty ( ) ; for vfmt in vformats { vl . wgpu_attrs . push ( wgpu :: VertexAttribute { shader_location : vl . wgpu_attrs . len ( ) as u32 , offset : vl . size as wgpu :: BufferAddress , format : vfmt . to_wgpu ( ) , } ) ; vl . size += vfmt . bytesize ( ) ; } log :: debug ! ( " " vl ) ; vl }
Convert from an array of VertexFormat to a VertexLayout
Convert from an array of VertexFormat to a VertexLayout
vformats
&[VertexFormat]