Skip to content

TextureView ​

Methods ​

addSampler ​

Create a sampler for this view and set it as the current sampler.

ArgumentTypeRequiredDescription
deviceYesThe device to create the sampler on.
optionsGPUSamplerDescriptorNoThe sampler descriptor.

create ​

Create a view of the given texture. The view is recreated automatically when the texture handle changes.

ArgumentTypeRequiredDescription
textureYesThe vtkWebGPUTexture to view.
optionsYesThe view descriptor, defaulting the dimension to '2d'.

createFromTextureHandle ​

Create a view of a GPUTexture that is not owned by a vtkWebGPUTexture.

ArgumentTypeRequiredDescription
textureHandleYesThe GPUTexture to view.
optionsYesThe view descriptor, whose format drives the sample type.

extend ​

Method used to decorate a given object (publicAPI+model) with vtkWebGPUTextureView characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUTextureViewInitialValuesNo(default: {})

getBindGroupEntry ​

Get the bind group entry for this view. The binding index is filled in by the bind group.

getBindGroupLayoutEntry ​

Get the bind group layout entry describing this view.

getBindGroupTime ​

Get the object whose modified time changes when the view is recreated.

getHandle ​

Get the GPUTextureView, recreating it when the texture handle changed.

getLabel ​

Get the WGSL name of the texture.

getSampler ​

Get the sampler paired with this view.

getShaderCode ​

Get the WGSL declaration of this texture.

ArgumentTypeRequiredDescription
bindingYesThe binding index.
groupYesThe bind group index.

getTexture ​

Get the vtkWebGPUTexture this is a view of.

newInstance ​

Method used to create a new instance of vtkWebGPUTextureView.

ArgumentTypeRequiredDescription
initialValuesIWebGPUTextureViewInitialValuesNofor pre-setting some of its content

setBindGroupLayoutEntry ​

Set the bind group layout entry describing this view.

setLabel ​

Set the WGSL name of the texture.

setSampler ​

Set the sampler paired with this view.