Abstract Class: Framebuffer
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:29
Create new textures with correct size for all attachments.
Note
resize() destroys existing textures (if size has changed).
Extends
Constructors
Constructor
new Framebuffer(
device,props?):Framebuffer
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:43
Parameters
device
props?
FramebufferProps = {}
Returns
Framebuffer
Overrides
Properties
colorAttachments
abstractcolorAttachments:TextureView[]
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:39
Color attachments
depthStencilAttachment
abstractdepthStencilAttachment:TextureView|null
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:41
Depth-stencil attachment, if provided
device
abstractreadonlydevice:Device
Defined in: modules/core/src/api/adapter/resources/device-resource.ts:127
The device that this resource is associated with
Inherited from
handle
abstractreadonlyhandle: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
height
height:
number
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:37
Height of all attachments in this framebuffer
id
id:
string
Defined in: modules/core/src/api/adapter/resources/device-resource.ts:121
props.id, for debugging.
Inherited from
props
readonlyprops:Required<Props>
Defined in: modules/core/src/api/adapter/resources/device-resource.ts:123
The props that this resource was created with
Inherited from
userData
readonlyuserData:Record<string,unknown> ={}
Defined in: modules/core/src/api/adapter/resources/device-resource.ts:125
User data object, reserved for the application
Inherited from
width
width:
number
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:35
Width of all attachments in this framebuffer
defaultProps
staticdefaultProps:Required<FramebufferProps>
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:222
Default properties for resource
Overrides
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:30
Returns
string
Overrides
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
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
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
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
Methods
[dispose]()
[dispose]():
void
Defined in: modules/core/src/api/adapter/resources/resource.ts:50
Destroy the resource when leaving a using scope.
Returns
void
Inherited from
attachResource()
attachResource(
resource):void
Defined in: modules/core/src/api/adapter/resources/resource.ts:96
Parameters
resource
Returns
void
Deprecated
Use resource.transferOwnershipTo(this).
Inherited from
clone()
clone(
size?):Framebuffer
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:72
Create a copy of this framebuffer with new attached textures, with same props but of the specified size.
Parameters
size?
height
number
width
number
Returns
Framebuffer
Note
Does not copy contents of the attached textures.
delete()
delete():
this
Defined in: modules/core/src/api/adapter/resources/resource.ts:90
Returns
this
Deprecated
Use destroy().
Inherited from
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
destroyAttachedResource()
destroyAttachedResource(
resource):void
Defined in: modules/core/src/api/adapter/resources/resource.ts:108
Parameters
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
Returns
void
Deprecated
Use resource.transferOwnershipTo(null). Only detaches a child owned by this.
Inherited from
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
resize()
Call Signature
resize(
size):void
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:109
Resizes all attachments
Parameters
size
height
number
width
number
Returns
void
Note
resize() destroys existing textures (if size has changed).
Deprecated
Use framebuffer.clone()
Call Signature
resize(
size):void
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:110
Resizes all attachments
Parameters
size
[number, number]
Returns
void
Note
resize() destroys existing textures (if size has changed).
Deprecated
Use framebuffer.clone()
Call Signature
resize():
void
Defined in: modules/core/src/api/adapter/resources/framebuffer.ts:111
Resizes all attachments
Returns
void
Note
resize() destroys existing textures (if size has changed).
Deprecated
Use framebuffer.clone()
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
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
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