A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/drawIndexed below:

GPURenderBundleEncoder: drawIndexed() method - Web APIs

GPURenderBundleEncoder: drawIndexed() method

Limited availability

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

The drawIndexed() method of the GPURenderBundleEncoder interface draws indexed primitives based on the vertex and index buffers provided by setVertexBuffer() and setIndexBuffer().

Note: This method is functionally identical to its equivalent on GPURenderPassEncoder — drawIndexed().

Syntax
drawIndexed(indexCount)
drawIndexed(indexCount, instanceCount)
drawIndexed(indexCount, instanceCount, firstIndex)
drawIndexed(indexCount, instanceCount, firstIndex, baseVertex)
drawIndexed(indexCount, instanceCount, firstIndex, baseVertex, firstInstance)
Parameters
indexCount

A number defining the number of indices to draw.

instanceCount Optional

A number defining the number of instances to draw. If omitted, instanceCount defaults to 1.

firstIndex Optional

A number defining the offset into the index buffer, in indices, to begin drawing from. If omitted, firstIndex defaults to 0.

baseVertex Optional

A number added to each index value before indexing into the vertex buffers. If omitted, baseVertex defaults to 0.

firstInstance Optional

A number defining the first instance to draw. If omitted, firstInstance defaults to 0.

Return value

None (Undefined).

Examples
// …

const bundleEncoder = device.createRenderBundleEncoder(descriptor);

bundleEncoder.setPipeline(pipeline);
bundleEncoder.setBindGroup(0, sceneBindGroupForRender);
bundleEncoder.setBindGroup(1, modelBindGroup);
bundleEncoder.setVertexBuffer(0, vertexBuffer);
bundleEncoder.setIndexBuffer(indexBuffer, "uint16");
bundleEncoder.drawIndexed(indexCount);

const renderBundle = bundleEncoder.finish();

// …
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4