pub struct DataArrayTexture(/* private fields */);Expand description
Cloning is a handle copy, as in JS.
Implementations§
Source§impl DataArrayTexture
impl DataArrayTexture
Sourcepub fn dispose(self)
pub fn dispose(self)
dataArrayTexture.dispose() — drops this handle, and nothing more: a texture
handle is an Rc, so the renderer frees the GPU side once every handle
is gone, at the top of the next render (docs/scene-graph.md,
“Identity and eviction”). Dropping the handle does the same; this
exists so three.js code ports line for line.
Sourcepub fn new(data: Vec<f32>, width: u32, height: u32, depth: u32) -> Self
pub fn new(data: Vec<f32>, width: u32, height: u32, depth: u32) -> Self
new DataArrayTexture( data, width, height, depth ) with
texture.type = FloatType — rgba32float on the GPU. NearestFilter
and no mipmaps, and the shader only ever textureLoads it, so there is
no sampler binding at all.
Sourcepub fn borrow(&self) -> Ref<'_, DataArrayTextureInner>
pub fn borrow(&self) -> Ref<'_, DataArrayTextureInner>
Borrows the texture’s data, width, height and depth.
Trait Implementations§
Source§impl Clone for DataArrayTexture
impl Clone for DataArrayTexture
Source§impl Debug for DataArrayTexture
The id is identity, not content: leaving it out keeps the Debug of a
binding description — what examples/dump_wgsl.rs prints beside the WGSL —
a function of the texture itself.
impl Debug for DataArrayTexture
The id is identity, not content: leaving it out keeps the Debug of a
binding description — what examples/dump_wgsl.rs prints beside the WGSL —
a function of the texture itself.