Skip to content

Documentation / device / FrameBuffer

Interface: FrameBuffer<T>

Defined in: libs/device/src/gpuobject.ts:1502

Abstract interface for frame buffer

Extends

Type Parameters

T

T = unknown

Properties

[EventMapType]?

readonly optional [EventMapType]?: object

Defined in: libs/base/dist/index.d.ts:549

Type-only event map marker.

dispose

dispose: []

Inherited from

GPUObject.[EventMapType]


device

readonly device: AbstractDevice

Defined in: libs/device/src/gpuobject.ts:1262

The object was created by which device

Inherited from

GPUObject.device


object

readonly object: T

Defined in: libs/device/src/gpuobject.ts:1264

The internal GPU object

Inherited from

GPUObject.object


uid

readonly uid: number

Defined in: libs/device/src/gpuobject.ts:1266

unique id

Inherited from

GPUObject.uid


cid

readonly cid: number

Defined in: libs/device/src/gpuobject.ts:1267

Inherited from

GPUObject.cid


disposed

readonly disposed: boolean

Defined in: libs/device/src/gpuobject.ts:1268

Inherited from

GPUObject.disposed


name

name: string

Defined in: libs/device/src/gpuobject.ts:1269

Inherited from

GPUObject.name


restoreHandler

restoreHandler: (tex) => void

Defined in: libs/device/src/gpuobject.ts:1270

Parameters

tex

GPUObject

Returns

void

Inherited from

GPUObject.restoreHandler

Methods

on()

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:556

Sets up a function that will be called whenever the specified event is delivered to the target

Type Parameters

K

K extends "dispose"

Parameters

type

K

The event type to listen for

listener

EventListener<{ dispose: []; }, K>

The callback function

context?

unknown

Context object of the listener function

Returns

void

Inherited from

GPUObject.on


once()

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:563

Sets up a function that will be called only once when the specified event is delivered to the target

Type Parameters

K

K extends "dispose"

Parameters

type

K

The event type to listen for

listener

EventListener<{ dispose: []; }, K>

The callback function

context?

unknown

Context object of the listener function

Returns

void

Inherited from

GPUObject.once


off()

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:569

Removes an event listener function previously registered.

Type Parameters

K

K extends "dispose"

Parameters

type

K

The event type for which to remove an event listener

listener?

EventListener<{ dispose: []; }>

The callback function to be removed

context?

unknown

Returns

void

Inherited from

GPUObject.off


dispatchEvent()

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:575

Synchronously invoke the affected event listeners with an event object

Type Parameters

K

K extends "dispose"

Parameters

type

K

args

...object[K]

Returns

void

false if the event was canceled, otherwise true

Inherited from

GPUObject.dispatchEvent


isVertexLayout()

isVertexLayout(): this is VertexLayout<unknown>

Defined in: libs/device/src/gpuobject.ts:1271

Returns

this is VertexLayout<unknown>

Inherited from

GPUObject.isVertexLayout


isFramebuffer()

isFramebuffer(): this is FrameBuffer<unknown>

Defined in: libs/device/src/gpuobject.ts:1272

Returns

this is FrameBuffer<unknown>

Inherited from

GPUObject.isFramebuffer


isSampler()

isSampler(): this is TextureSampler<unknown>

Defined in: libs/device/src/gpuobject.ts:1273

Returns

this is TextureSampler<unknown>

Inherited from

GPUObject.isSampler


isTexture()

isTexture(): this is BaseTexture<unknown>

Defined in: libs/device/src/gpuobject.ts:1274

Returns

this is BaseTexture<unknown>

Inherited from

GPUObject.isTexture


isTexture2D()

isTexture2D(): this is Texture2D<unknown>

Defined in: libs/device/src/gpuobject.ts:1275

Returns

this is Texture2D<unknown>

Inherited from

GPUObject.isTexture2D


isTexture2DArray()

isTexture2DArray(): this is Texture2DArray<unknown>

Defined in: libs/device/src/gpuobject.ts:1276

Returns

this is Texture2DArray<unknown>

Inherited from

GPUObject.isTexture2DArray


isTexture3D()

isTexture3D(): this is Texture3D<unknown>

Defined in: libs/device/src/gpuobject.ts:1277

Returns

this is Texture3D<unknown>

Inherited from

GPUObject.isTexture3D


isTextureCube()

isTextureCube(): this is TextureCube<unknown>

Defined in: libs/device/src/gpuobject.ts:1278

Returns

this is TextureCube<unknown>

Inherited from

GPUObject.isTextureCube


isTextureVideo()

isTextureVideo(): this is TextureVideo<unknown>

Defined in: libs/device/src/gpuobject.ts:1279

Returns

this is TextureVideo<unknown>

Inherited from

GPUObject.isTextureVideo


isProgram()

isProgram(): this is GPUProgram<unknown>

Defined in: libs/device/src/gpuobject.ts:1280

Returns

this is GPUProgram<unknown>

Inherited from

GPUObject.isProgram


isBuffer()

isBuffer(): this is GPUDataBuffer<unknown>

Defined in: libs/device/src/gpuobject.ts:1281

Returns

this is GPUDataBuffer<unknown>

Inherited from

GPUObject.isBuffer


isBindGroup()

isBindGroup(): this is BindGroup

Defined in: libs/device/src/gpuobject.ts:1282

Returns

this is BindGroup

Inherited from

GPUObject.isBindGroup


dispose()

dispose(): void

Defined in: libs/device/src/gpuobject.ts:1283

Returns

void

Inherited from

GPUObject.dispose


reload()

reload(): void

Defined in: libs/device/src/gpuobject.ts:1284

Returns

void

Inherited from

GPUObject.reload


destroy()

destroy(): void

Defined in: libs/device/src/gpuobject.ts:1285

Returns

void

Inherited from

GPUObject.destroy


restore()

restore(): void

Defined in: libs/device/src/gpuobject.ts:1286

Returns

void

Inherited from

GPUObject.restore


getWidth()

getWidth(): number

Defined in: libs/device/src/gpuobject.ts:1503

Returns

number


getHeight()

getHeight(): number

Defined in: libs/device/src/gpuobject.ts:1504

Returns

number


getSampleCount()

getSampleCount(): number

Defined in: libs/device/src/gpuobject.ts:1505

Returns

number


getHash()

getHash(): string

Defined in: libs/device/src/gpuobject.ts:1506

Returns

string


setColorAttachmentCubeFace()

setColorAttachmentCubeFace(index, face): void

Defined in: libs/device/src/gpuobject.ts:1507

Parameters

index

number

face

CubeFace

Returns

void


getColorAttachmentCubeFace()

getColorAttachmentCubeFace(index): CubeFace

Defined in: libs/device/src/gpuobject.ts:1508

Parameters

index

number

Returns

CubeFace


setColorAttachmentMipLevel()

setColorAttachmentMipLevel(index, level): void

Defined in: libs/device/src/gpuobject.ts:1509

Parameters

index

number

level

number

Returns

void


getColorAttachmentMipLevel()

getColorAttachmentMipLevel(index): number

Defined in: libs/device/src/gpuobject.ts:1510

Parameters

index

number

Returns

number


setColorAttachmentLayer()

setColorAttachmentLayer(index, layer): void

Defined in: libs/device/src/gpuobject.ts:1511

Parameters

index

number

layer

number

Returns

void


getColorAttachmentLayer()

getColorAttachmentLayer(index): number

Defined in: libs/device/src/gpuobject.ts:1512

Parameters

index

number

Returns

number


setColorAttachmentGenerateMipmaps()

setColorAttachmentGenerateMipmaps(index, generateMipmaps): void

Defined in: libs/device/src/gpuobject.ts:1513

Parameters

index

number

generateMipmaps

boolean

Returns

void


getColorAttachmentGenerateMipmaps()

getColorAttachmentGenerateMipmaps(index): boolean

Defined in: libs/device/src/gpuobject.ts:1514

Parameters

index

number

Returns

boolean


setDepthAttachmentCubeFace()

setDepthAttachmentCubeFace(face): void

Defined in: libs/device/src/gpuobject.ts:1515

Parameters

face

CubeFace

Returns

void


getDepthAttachmentCubeFace()

getDepthAttachmentCubeFace(): CubeFace

Defined in: libs/device/src/gpuobject.ts:1516

Returns

CubeFace


setDepthAttachmentLayer()

setDepthAttachmentLayer(layer): void

Defined in: libs/device/src/gpuobject.ts:1517

Parameters

layer

number

Returns

void


getDepthAttachmentLayer()

getDepthAttachmentLayer(): number

Defined in: libs/device/src/gpuobject.ts:1518

Returns

number


getColorAttachments()

getColorAttachments(): BaseTexture<unknown>[]

Defined in: libs/device/src/gpuobject.ts:1519

Returns

BaseTexture<unknown>[]


getDepthAttachment()

getDepthAttachment(): BaseTexture<unknown>

Defined in: libs/device/src/gpuobject.ts:1520

Returns

BaseTexture<unknown>


getColorAttachment()

getColorAttachment<T>(index): T

Defined in: libs/device/src/gpuobject.ts:1521

Type Parameters

T

T extends BaseTexture<unknown> = BaseTexture<unknown>

Parameters

index

number

Returns

T


bind()

bind(): boolean

Defined in: libs/device/src/gpuobject.ts:1522

Returns

boolean


unbind()

unbind(): void

Defined in: libs/device/src/gpuobject.ts:1523

Returns

void

Released under the MIT License.