Documentation Index
Fetch the complete documentation index at: https://rive-editor-sidebar-reorg.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
An active render pass. Issue all draw calls before calling finish().
Methods
setPipeline
setPipeline(pipeline: GPUPipeline) -> ()
Bind a pipeline for subsequent draw calls.
setVertexBuffer
setVertexBuffer(slot: number, buffer: GPUBuffer) -> ()
Bind a vertex buffer to slot (0-based).
setIndexBuffer
setIndexBuffer(buffer: GPUBuffer, format: ('uint16' | 'uint32')?) -> ()
Bind an index buffer. format defaults to ‘uint16’.
setBindGroup
setBindGroup(groupIndex: number, bg: GPUBindGroup, dynamicOffsets: {number}?) -> ()
Bind a pre-created BindGroup to a group slot.
dynamicOffsets: one byte offset per dynamic UBO in this group
(dynamic UBOs are declared on the pipeline via
BindGroupLayoutEntry.hasDynamicOffset). Order matches the UBOs’ appearance
in BindGroupDesc.ubos. Typical 3D pattern: shared texture
BindGroup at group 1, per-object UBO dynamic offset at group 0.
setViewport
setViewport(x: number, y: number, w: number, h: number) -> ()
Set the render viewport in pixels. Origin is top-left on all backends except GL (bottom-left).
setScissorRect
setScissorRect(x: number, y: number, w: number, h: number) -> ()
Set the scissor rectangle in pixels.
setStencilReference
setStencilReference(ref: number) -> ()
Set the stencil reference value.
setBlendColor
setBlendColor(r: number, g: number, b: number, a: number) -> ()
Set the constant blend color for ‘constant’ / ‘one-minus-constant’ factors.
draw
draw(vertexCount: number, instanceCount: number?, firstVertex: number?) -> ()
Non-indexed draw. instanceCount defaults to 1, firstVertex to 0.
drawIndexed
drawIndexed(indexCount: number, instanceCount: number?, firstIndex: number?) -> ()
Indexed draw. instanceCount defaults to 1, firstIndex to 0.
finish
Submit the pass. Any further method calls on this object will error.