Starts a render pass.
the GPU device
Optional
pass: null | RenderPassthe render pass
Copies data from a buffer to another buffer.
the GPU device
the buffer to read from
the buffer to write to
Optional
size: numberthe byte size of the GPU buffer to read. Defaults to the whole buffer
Optional
srcOffset: numberthe byte offset into src buffer to begin reading from. Defaults to 0
Optional
dstOffset: numberthe byte offset into dst buffer to begin writing to. Defaults to 0
Uploads an image subregion to a texture.
the GPU device
the image subregion to write
the texture subregion to write to.
Optional
size: Extent2Dthe size of image subregion to write
Copies subregion of a texture to another texture.
the GPU device
the texture subregion to read from.
the texture subregion to write to.
Optional
size: Extent3Dthe size of the texture subregion to copy
Copies subregion of a texture to a buffer.
the GPU device
the texture subregion to read from.
the buffer to write to
the buffer data layout to use for storing the texture
Optional
size: Extent3Dthe size of the texture subregion to copy
Creates a new pipeline bind group object.
the GPU device
the bind group descriptor
new bind group object
Creates a new pipeline bind group layout object.
the GPU device
the bind group layout descriptor
new bind group layout object
Creates a new buffer object.
the GPU device
the buffer descriptor
new buffer object
Creates a new render pass object.
the GPU device
the render pass descriptor.
new render pass
Creates a new render pipeline state object.
the GPU device
the pipeline descriptor
new render pipeline object
Creates a new sampler object.
the GPU device
the sampler descriptor
new sampler object
Creates a new shader module object.
the GPU device
the shader descriptor
new shader object
Creates a new texture object.
the GPU device
the texture descriptor
new texture object
Submits a draw call in the current render pass.
the GPU device
the number of vertices to draw
Optional
instanceCount: numberthe number of instances to draw. Defaults to 1
Optional
firstVertex: numberthe offset to the first vertex to draw. Defaults to 0
Optional
firstInstance: numberthe offset to the first instance to draw. Defaults to 0
Submits an indexed draw call in the current render pass.
the GPU device
the number of vertices to draw
Optional
instanceCount: numberthe number of instances to draw. Defaults to 1
Optional
firstIndex: numberthe offset to the first vertex to draw. Defaults to 0
Optional
firstInstance: numberthe offset to the first instance to draw. Defaults to 0
Flushes the command buffer.
the GPU device
Gets the enabled features of the device.
the GPU device
enabled features bitflag
Returns if device context is lost.
the GPU device
true if device context is lost
Resets the device state.
the GPU device
Binds a RenderPipeline to the current render pass.
the GPU device
the pipeline to bind
Sets the scissor rectangle for the current render pass.
the GPU device
x offset
y offset
width
height
Sets the stencil reference value for the current render pass.
the GPU device
the stencil reference value.
Sets the 3D viewport area for the current render pass.
the GPU device
x offset
y offset
width
height
Optional
minDepth: numbermin depth. Defaults to 0
Optional
maxDepth: numbermax depth. Defaults to 1
Submits the current render pass.
the GPU device
Writes subregion of data array to a texture.
the GPU device
the texture subregion to write to.
the texture data
the data layout
Optional
size: Extent3Dthe size of the data subregion to write
Generated using TypeDoc
Minimal WebGPU-like rendering interface.