pub fn new<T>(
        device: &Device,
        memory: &mut Memory,
        count: usize,
        usage: BufferUsageFlags,
        lifetime: Lifetime,
        reason: &str)
        -> Result<DeviceLocalBuffer, Error>
    {
        let stride = memory.stride(::std::mem::size_of::<T>(), Some(usage));
        let size = (count * stride) as u64;

        let (buffer, block) = _new(device, memory, size, usage, lifetime, reason,
                                   MemoryPropertyFlags::DEVICE_LOCAL)?;

        Ok(DeviceLocalBuffer {
            buffer: buffer,
            block: block,
        })
    }
// Creates a new DeviceLocalBuffer. The type T is used for sizing (including alignment
// padding) but is not part of the created type, so you can use it with
// other types later.
Creates a new DeviceLocalBuffer. The type T is used for sizing (including alignment
padding) but is not part of the created type, so you can use it with
other types later.
Creates a new DeviceLocalBuffer . The type T is used for sizing ( including alignment padding ) but is not part of the created type so you can use it with other types later .
pub fn new<T>(
        device: &Device,
        memory: &mut Memory,
        count: usize,
        usage: BufferUsageFlags,
        lifetime: Lifetime,
        reason: &str)
        -> Result<DeviceLocalBuffer, Error>
    {
        let stride = memory.stride(::std::mem::size_of::<T>(), Some(usage));
        let size = (count * stride) as u64;
        let (buffer, block) = _new(device, memory, size, usage, lifetime, reason,
                                   MemoryPropertyFlags::DEVICE_LOCAL)?;
        Ok(DeviceLocalBuffer {
            buffer: buffer,
            block: block,
        })
    }
pub fn new < T > ( device : & Device , memory : & mut Memory , count : usize , usage : BufferUsageFlags , lifetime : Lifetime , reason : & str ) -> Result < DeviceLocalBuffer , Error > { let stride = memory . stride ( :: std :: mem :: size_of :: < T > ( ) , Some ( usage ) ) ; let size = ( count * stride ) as u64 ; let ( buffer , block ) = _new ( device , memory , size , usage , lifetime , reason , MemoryPropertyFlags :: DEVICE_LOCAL ) ? ; Ok ( DeviceLocalBuffer { buffer : buffer , block : block , } ) }
Creates a new DeviceLocalBuffer.
Creates a new DeviceLocalBuffer .
device
&Device
memory
&mut Memory
count
usize
usage
BufferUsageFlags
lifetime
Lifetime
reason
&str
device
&Device
memory
&mut Memory
count
usize
usage
BufferUsageFlags
lifetime
Lifetime
reason
&str