Skip to main content

Abstract Class: RenderBundleEncoder

Defined in: modules/core/src/adapter/resources/render-bundle.ts:75

Records reusable WebGPU draw commands without beginning a render pass.

Remarks

Call RenderBundleEncoder.finish to create an immutable RenderBundle. The attachment formats and sample count supplied when creating the encoder must match every RenderPass that executes the finished bundle.

Extends

Constructors

Constructor

new RenderBundleEncoder(device, props?): RenderBundleEncoder

Defined in: modules/core/src/adapter/resources/render-bundle.ts:84

Parameters

device

Device

props?

RenderBundleEncoderProps = {}

Returns

RenderBundleEncoder

Overrides

RenderPass.constructor

Properties

destroyed

destroyed: boolean = false

Defined in: modules/core/src/adapter/resources/resource.ts:131

Whether this resource has been destroyed

Inherited from

RenderPass.destroyed


device

abstract readonly device: Device

Defined in: modules/core/src/adapter/resources/resource.ts:124

The device that this resource is associated with

Inherited from

RenderPass.device


handle

abstract readonly handle: unknown

Defined in: modules/core/src/adapter/resources/resource.ts:126

The handle for the underlying resource, e.g. WebGL object or WebGPU handle

Inherited from

RenderPass.handle


id

id: string

Defined in: modules/core/src/adapter/resources/resource.ts:118

props.id, for debugging.

Inherited from

RenderPass.id


props

readonly props: Required<Props>

Defined in: modules/core/src/adapter/resources/resource.ts:120

The props that this resource was created with

Inherited from

RenderPass.props


userData

readonly userData: Record<string, unknown> = {}

Defined in: modules/core/src/adapter/resources/resource.ts:122

User data object, reserved for the application

Inherited from

RenderPass.userData


defaultClearColor

static defaultClearColor: [number, number, number, number]

Defined in: modules/core/src/adapter/resources/render-pass.ts:104

TODO - should be [0, 0, 0, 0], update once deck.gl tests run clean

Inherited from

RenderPass.defaultClearColor


defaultClearDepth

static defaultClearDepth: number = 1

Defined in: modules/core/src/adapter/resources/render-pass.ts:106

Depth 1.0 represents the far plance

Inherited from

RenderPass.defaultClearDepth


defaultClearStencil

static defaultClearStencil: number = 0

Defined in: modules/core/src/adapter/resources/render-pass.ts:108

Clears all stencil bits

Inherited from

RenderPass.defaultClearStencil


defaultProps

static defaultProps: Required<RenderPassProps>

Defined in: modules/core/src/adapter/resources/render-pass.ts:177

Default properties for RenderPass

Inherited from

RenderPass.defaultProps

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: modules/core/src/adapter/resources/render-bundle.ts:76

Returns

string

Overrides

RenderPass.[toStringTag]


isHandleBorrowed

Get Signature

get isHandleBorrowed(): boolean

Defined in: modules/core/src/adapter/resources/resource.ts:147

Whether luma.gl may only reference the opaque externally owned resource handle.

Returns

boolean

Inherited from

RenderPass.isHandleBorrowed


ownsHandle

Get Signature

get ownsHandle(): boolean

Defined in: modules/core/src/adapter/resources/resource.ts:140

Whether luma.gl created and owns the underlying resource handle.

Returns

boolean

Inherited from

RenderPass.ownsHandle

Methods

attachResource()

attachResource(resource): void

Defined in: modules/core/src/adapter/resources/resource.ts:200

Attaches a resource. Attached resources are auto destroyed when this resource is destroyed Called automatically when sub resources are auto created but can be called by application

Parameters

resource

Resource<ResourceProps>

Returns

void

Inherited from

RenderPass.attachResource


beginOcclusionQuery()

beginOcclusionQuery(_queryIndex): void

Defined in: modules/core/src/adapter/resources/render-bundle.ts:119

Render bundle encoders cannot begin occlusion queries.

Parameters

_queryIndex

number

Returns

void

Throws

Always throws.

Overrides

RenderPass.beginOcclusionQuery


delete()

delete(): this

Defined in: modules/core/src/adapter/resources/resource.ts:181

Returns

this

Deprecated

Use destroy()

Inherited from

RenderPass.delete


destroy()

destroy(): void

Defined in: modules/core/src/adapter/resources/resource.ts:173

destroy can be called on any resource to release it before it is garbage collected.

Returns

void

Inherited from

RenderPass.destroy


destroyAttachedResource()

destroyAttachedResource(resource): void

Defined in: modules/core/src/adapter/resources/resource.ts:214

Destroys a resource (only if owned), and removes from the owned (auto-destroy) list for this resource.

Parameters

resource

Resource<ResourceProps>

Returns

void

Inherited from

RenderPass.destroyAttachedResource


destroyAttachedResources()

destroyAttachedResources(): void

Defined in: modules/core/src/adapter/resources/resource.ts:221

Destroy all owned resources. Make sure the resources are no longer needed before calling.

Returns

void

Inherited from

RenderPass.destroyAttachedResources


detachResource()

detachResource(resource): void

Defined in: modules/core/src/adapter/resources/resource.ts:207

Detach an attached resource. The resource will no longer be auto-destroyed when this resource is destroyed.

Parameters

resource

Resource<ResourceProps>

Returns

void

Inherited from

RenderPass.detachResource


draw()

abstract draw(options): boolean

Defined in: modules/core/src/adapter/resources/render-pass.ts:145

Issues a draw using the currently selected pipeline, bindings, and vertex array.

Parameters

options

RenderPassDrawOptions

Returns

boolean

Inherited from

RenderPass.draw


drawIndexedIndirect()

abstract drawIndexedIndirect(indirectBuffer, indirectByteOffset?): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:151

Issues an indexed draw using five 32-bit arguments stored in an indirect buffer.

Parameters

indirectBuffer

Buffer

indirectByteOffset?

number

Returns

void

Inherited from

RenderPass.drawIndexedIndirect


drawIndirect()

abstract drawIndirect(indirectBuffer, indirectByteOffset?): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:148

Issues a non-indexed draw using four uint32 arguments stored in an indirect buffer.

Parameters

indirectBuffer

Buffer

indirectByteOffset?

number

Returns

void

Inherited from

RenderPass.drawIndirect


end()

end(): void

Defined in: modules/core/src/adapter/resources/render-bundle.ts:103

Render bundle encoders cannot be ended like render passes.

Returns

void

Throws

Always throws. Call RenderBundleEncoder.finish instead.

Overrides

RenderPass.end


endOcclusionQuery()

endOcclusionQuery(): void

Defined in: modules/core/src/adapter/resources/render-bundle.ts:127

Render bundle encoders cannot end occlusion queries.

Returns

void

Throws

Always throws.

Overrides

RenderPass.endOcclusionQuery


executeBundles()

abstract executeBundles(bundles): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:158

Replays reusable draw commands recorded by one or more render bundle encoders.

Parameters

bundles

Iterable<RenderBundle>

Bundles whose attachment formats and sample count are compatible with this pass.

Returns

void

Throws

On backends other than WebGPU.

Inherited from

RenderPass.executeBundles


finish()

abstract finish(): RenderBundle

Defined in: modules/core/src/adapter/resources/render-bundle.ts:97

Completes recording and invalidates this encoder.

Returns

RenderBundle

An immutable reusable bundle that inherits this encoder's id and userData.


getProps()

getProps(): object

Defined in: modules/core/src/adapter/resources/resource.ts:190

Combines a map of user props and default props, only including props from defaultProps

Returns

object

returns a map of overridden default props

Inherited from

RenderPass.getProps


insertDebugMarker()

abstract insertDebugMarker(markerLabel): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:170

Marks a point in a stream of commands with a label

Parameters

markerLabel

string

Returns

void

Inherited from

RenderPass.insertDebugMarker


popDebugGroup()

abstract popDebugGroup(): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:168

Ends the labeled debug group most recently started by pushDebugGroup()

Returns

void

Inherited from

RenderPass.popDebugGroup


pushDebugGroup()

abstract pushDebugGroup(groupLabel): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:166

Begins a labeled debug group containing subsequent commands

Parameters

groupLabel

string

Returns

void

Inherited from

RenderPass.pushDebugGroup


setBindings()

abstract setBindings(bindings, options?): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:136

Replaces the complete binding set used by subsequent draw commands. A pipeline must be selected first so bindings can be resolved against its shader layout.

Parameters

bindings

Bindings | Partial<Record<number, Bindings>>

options?

RenderPassBindingOptions

Returns

void

Inherited from

RenderPass.setBindings


setParameters()

setParameters(_parameters): void

Defined in: modules/core/src/adapter/resources/render-bundle.ts:111

Render bundle encoders do not support render-pass dynamic state.

Parameters

_parameters

RenderPassParameters

Returns

void

Throws

Always throws.

Overrides

RenderPass.setParameters


setPipeline()

abstract setPipeline(pipeline): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:130

Selects the pipeline used by subsequent binding and draw commands.

Parameters

pipeline

RenderPipeline

Returns

void

Inherited from

RenderPass.setPipeline


setVertexArray()

abstract setVertexArray(vertexArray): void

Defined in: modules/core/src/adapter/resources/render-pass.ts:142

Selects the vertex array used by subsequent draw commands.

Parameters

vertexArray

VertexArray

Returns

void

Inherited from

RenderPass.setVertexArray


toJSON()

toJSON(): string

Defined in: modules/core/src/adapter/resources/resource.ts:113

Compact serialization for assertion diffs and structured debug logs.

Returns

string

Inherited from

RenderPass.toJSON


toString()

toString(): string

Defined in: modules/core/src/adapter/resources/resource.ts:108

Returns

string

Inherited from

RenderPass.toString