webgpu-utils

    Function setVertexAndIndexBuffers

    • Calls passEncoder.setVertexBuffer and optionally passEncoder.setIndexBuffer for the buffers specified in buffersAndAttributes.

      This is extremely simple function. It is equivalent to

      buffersAndAttributes.buffers.forEach((buffer, i) => {
      passEncoder.setVertexBuffer(firstVertexBufferIndex + i, buffer);
      });

      if (buffersAndAttributes.indexBuffer) {
      passEncoder.setIndexBuffer(buffersAndAttributes.indexBuffer, buffersAndAttributes.indexFormat!);
      }

      It exists solely for simple cases. If you have a complex case, call the passEncoder yourself as appropriate.

      Parameters

      Returns void

    MMNEPVFCICPMFPCPTTAAATR