Skip to main content

Abstract Class: RenderPass

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

A RenderPass instance is a required parameter to all draw calls.

It holds a combination of

  • render targets (specified via a framebuffer)
  • clear colors, read/write, discard information for the framebuffer attachments
  • a couple of mutable parameters ()

Extends​

Extended by​

Constructors​

Constructor​

new RenderPass(device, props, defaultProps?): RenderPass

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

Parameters​

device​

Device

props​

RenderPassProps

defaultProps?​

Required<RenderPassProps> = RenderPass.defaultProps

Returns​

RenderPass

Overrides​

DeviceResource.constructor

Properties​

device​

abstract readonly device: Device

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:127

The device that this resource is associated with

Inherited from​

DeviceResource.device


handle​

abstract readonly handle: unknown

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:129

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

Inherited from​

DeviceResource.handle


id​

id: string

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:121

props.id, for debugging.

Inherited from​

DeviceResource.id


props​

readonly props: Required<Props>

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:123

The props that this resource was created with

Inherited from​

DeviceResource.props


userData​

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

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:125

User data object, reserved for the application

Inherited from​

DeviceResource.userData


defaultClearColor​

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

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

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


defaultClearDepth​

static defaultClearDepth: number = 1

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

Depth 1.0 represents the far plance


defaultClearStencil​

static defaultClearStencil: number = 0

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

Clears all stencil bits


defaultProps​

static defaultProps: Required<RenderPassProps>

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

Default properties for RenderPass

Overrides​

DeviceResource.defaultProps

Accessors​

[toStringTag]​

Get Signature​

get [toStringTag](): string

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

Returns​

string

Overrides​

DeviceResource.[toStringTag]


destroyed​

Get Signature​

get destroyed(): boolean

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

Whether destruction has completed, including when cleanup reported an error.

Returns​

boolean

Inherited from​

DeviceResource.destroyed


isHandleBorrowed​

Get Signature​

get isHandleBorrowed(): boolean

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:146

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

Returns​

boolean

Inherited from​

DeviceResource.isHandleBorrowed


ownedResources​

Get Signature​

get ownedResources(): readonly Resource[]

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

A snapshot of this resource's children. Mutating the snapshot cannot change ownership.

Returns​

readonly Resource[]

Inherited from​

DeviceResource.ownedResources


owner​

Get Signature​

get owner(): Resource | null

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

The resource responsible for destroying this resource, or null for caller-managed lifetime.

Returns​

Resource | null

Inherited from​

DeviceResource.owner


ownsHandle​

Get Signature​

get ownsHandle(): boolean

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:139

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

Returns​

boolean

Inherited from​

DeviceResource.ownsHandle

Methods​

[dispose]()​

[dispose](): void

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

End the pass when leaving a using scope.

Returns​

void

Overrides​

DeviceResource.[dispose]


attachResource()​

attachResource(resource): void

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

Parameters​

resource​

Resource

Returns​

void

Deprecated​

Use resource.transferOwnershipTo(this).

Inherited from​

DeviceResource.attachResource


beginOcclusionQuery()​

abstract beginOcclusionQuery(queryIndex): void

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

Being an occlusion query. Value will be stored in the occlusionQuerySet at the index. Occlusion queries cannot be nested.

Parameters​

queryIndex​

number

Returns​

void


delete()​

delete(): this

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

Returns​

this

Deprecated​

Use destroy().

Inherited from​

DeviceResource.delete


destroy()​

destroy(): void

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

Destroy children before this resource. Subclasses implement hooks instead of overriding.

Returns​

void

Inherited from​

DeviceResource.destroy


destroyAttachedResource()​

destroyAttachedResource(resource): void

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

Parameters​

resource​

Resource

Returns​

void

Deprecated​

Check resource.owner and call resource.destroy().

Inherited from​

DeviceResource.destroyAttachedResource


destroyAttachedResources()​

destroyAttachedResources(): void

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

Returns​

void

Deprecated​

Destroy individually owned resources, or destroy the owner.

Inherited from​

DeviceResource.destroyAttachedResources


detachResource()​

detachResource(resource): void

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

Parameters​

resource​

Resource

Returns​

void

Deprecated​

Use resource.transferOwnershipTo(null). Only detaches a child owned by this.

Inherited from​

DeviceResource.detachResource


draw()​

abstract draw(options): boolean

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

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

Parameters​

options​

RenderPassDrawOptions

Returns​

boolean


drawIndexedIndirect()​

abstract drawIndexedIndirect(indirectBuffer, indirectByteOffset?): void

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

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

Parameters​

indirectBuffer​

Buffer

indirectByteOffset?​

number

Returns​

void


drawIndirect()​

abstract drawIndirect(indirectBuffer, indirectByteOffset?): void

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

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

Parameters​

indirectBuffer​

Buffer

indirectByteOffset?​

number

Returns​

void


end()​

abstract end(): void

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

Call when rendering is done in this pass.

Returns​

void


endOcclusionQuery()​

abstract endOcclusionQuery(): void

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

End an occlusion query. Stores result in the index specified in beginOcclusionQuery.

Returns​

void


executeBundles()​

abstract executeBundles(bundles): void

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

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.


getParameters()​

abstract getParameters(): RenderPassParameters

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

Returns a detached snapshot of the current dynamic render-pass parameters.

Returns​

RenderPassParameters


getProps()​

getProps(): object

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:174

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​

DeviceResource.getProps


insertDebugMarker()​

abstract insertDebugMarker(markerLabel): void

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

Marks a point in a stream of commands with a label

Parameters​

markerLabel​

string

Returns​

void


popDebugGroup()​

abstract popDebugGroup(): void

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

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

Returns​

void


pushDebugGroup()​

abstract pushDebugGroup(groupLabel): void

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

Begins a labeled debug group containing subsequent commands

Parameters​

groupLabel​

string

Returns​

void


setBindings()​

abstract setBindings(bindings, options?): void

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

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


setParameters()​

abstract setParameters(parameters): void

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

A few parameters can be changed at any time (viewport, scissorRect, blendColor, stencilReference)

Parameters​

parameters​

RenderPassParameters

Returns​

void


setPipeline()​

abstract setPipeline(pipeline): void

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

Selects the pipeline used by subsequent binding and draw commands.

Parameters​

pipeline​

RenderPipeline

Returns​

void


setVertexArray()​

abstract setVertexArray(vertexArray): void

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

Selects the vertex array used by subsequent draw commands.

Parameters​

vertexArray​

VertexArray

Returns​

void


toJSON()​

toJSON(): string

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:116

Compact serialization for assertion diffs and structured debug logs.

Returns​

string

Inherited from​

DeviceResource.toJSON


toString()​

toString(): string

Defined in: modules/core/src/api/adapter/resources/device-resource.ts:111

Returns a string representation of an object.

Returns​

string

Inherited from​

DeviceResource.toString


transferOwnershipTo()​

transferOwnershipTo(owner): this

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

Transfer exclusive ownership, or return lifetime responsibility to the caller with null.

Parameters​

owner​

Resource | null

Returns​

this

Inherited from​

DeviceResource.transferOwnershipTo