Skip to main content

import_texture

Function import_texture 

Source
pub fn import_texture(device: &Device, buffer: &HardwareBuffer) -> Texture
Expand description

buffer imported as a texture on device, over its memory, as a wgpu::Texture (wasdk:platform/gpu-interop): a buffer the program allocated, an image the hardware codecs decoded or a video frame’s, which the texture holds, with its frame, until it is dropped. Its size and format are the buffer’s, and its usages follow from the buffer’s usage.