Interface GPURenderBundleEncoder

Hierarchy

Properties

label: string

Methods

  • Draws primitives. See https://www.w3.org/TR/webgpu/#rendering-operations for the detailed specification.

    Parameters

    • vertexCount: number

      The number of vertices to draw.

    • Optional instanceCount: number

      The number of instances to draw.

    • Optional firstVertex: number

      Offset into the vertex buffers, in vertices, to begin drawing from.

    • Optional firstInstance: number

      First instance to draw.

    Returns undefined

  • Draws indexed primitives. See https://www.w3.org/TR/webgpu/#rendering-operations for the detailed specification.

    Parameters

    • indexCount: number

      The number of indices to draw.

    • Optional instanceCount: number

      The number of instances to draw.

    • Optional firstIndex: number

      Offset into the index buffer, in indices, begin drawing from.

    • Optional baseVertex: number

      Added to each index value before indexing into the vertex buffers.

    • Optional firstInstance: number

      First instance to draw.

    Returns undefined

  • Sets the current GPUBindGroup for the given index.

    Parameters

    • index: number

      The index to set the bind group at.

    • bindGroup: undefined | null | GPUBindGroup

      Bind group to use for subsequent render or compute commands.

    • Optional dynamicOffsets: Iterable<number>

      Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.-->

    Returns undefined

  • Sets the current GPUBindGroup for the given index, specifying dynamic offsets as a subset of a Uint32Array.

    Parameters

    • index: number

      The index to set the bind group at.

    • bindGroup: undefined | null | GPUBindGroup

      Bind group to use for subsequent render or compute commands.

    • dynamicOffsetsData: Uint32Array

      Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.

    • dynamicOffsetsDataStart: number

      Offset in elements into dynamicOffsetsData where the buffer offset data begins.

    • dynamicOffsetsDataLength: number

      Number of buffer offsets to read from dynamicOffsetsData.

    Returns undefined

  • Sets the current index buffer.

    Parameters

    • buffer: GPUBuffer

      Buffer containing index data to use for subsequent drawing commands.

    • indexFormat: GPUIndexFormat

      Format of the index data contained in buffer.

    • Optional offset: number

      Offset in bytes into buffer where the index data begins. Defaults to 0.

    • Optional size: number

      Size in bytes of the index data in buffer. Defaults to the size of the buffer minus the offset.

    Returns undefined

  • Sets the current vertex buffer for the given slot.

    Parameters

    • slot: number

      The vertex buffer slot to set the vertex buffer for.

    • buffer: undefined | null | GPUBuffer

      Buffer containing vertex data to use for subsequent drawing commands.

    • Optional offset: number

      Offset in bytes into buffer where the vertex data begins. Defaults to 0.

    • Optional size: number

      Size in bytes of the vertex data in buffer. Defaults to the size of the buffer minus the offset.

    Returns undefined

Generated using TypeDoc