Trait nannou::wgpu::util::DeviceExt[][src]

pub trait DeviceExt {
    pub fn create_buffer_init(&self, desc: &BufferInitDescriptor<'_>) -> Buffer;
pub fn create_texture_with_data(
        &self,
        queue: &Queue,
        desc: &TextureDescriptor<Option<&str>>,
        data: &[u8]
    ) -> Texture; }

Utility methods not meant to be in the main API.

Required methods

pub fn create_buffer_init(&self, desc: &BufferInitDescriptor<'_>) -> Buffer[src]

Creates a Buffer with data to initialize it.

pub fn create_texture_with_data(
    &self,
    queue: &Queue,
    desc: &TextureDescriptor<Option<&str>>,
    data: &[u8]
) -> Texture
[src]

Upload an entire texture and its mipmaps from a source buffer.

Expects all mipmaps to be tightly packed in the data buffer.

If the texture is a 2DArray texture, uploads each layer in order, expecting each layer and its mips to be tightly packed.

Example: Layer0Mip0 Layer0Mip1 Layer0Mip2 … Layer1Mip0 Layer1Mip1 Layer1Mip2 …

Loading content...

Implementors

impl DeviceExt for Device[src]

Loading content...