TextureView
Methods
addSampler
Create a sampler for this view and set it as the current sampler.
| Argument | Type | Required | Description |
|---|---|---|---|
device | Yes | The device to create the sampler on. | |
options | GPUSamplerDescriptor | No | The sampler descriptor. |
create
Create a view of the given texture. The view is recreated automatically when the texture handle changes.
| Argument | Type | Required | Description |
|---|---|---|---|
texture | Yes | The vtkWebGPUTexture to view. | |
options | Yes | The view descriptor, defaulting the dimension to '2d'. |
createFromTextureHandle
Create a view of a GPUTexture that is not owned by a vtkWebGPUTexture.
| Argument | Type | Required | Description |
|---|---|---|---|
textureHandle | Yes | The GPUTexture to view. | |
options | Yes | The view descriptor, whose format drives the sample type. |
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPUTextureView characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IWebGPUTextureViewInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
binding | Yes | The binding index. | |
group | Yes | The bind group index. |
getTexture
Get the vtkWebGPUTexture this is a view of.
newInstance
Method used to create a new instance of vtkWebGPUTextureView.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPUTextureViewInitialValues | No | for 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.