Skip to content

Documentation / device / FrameBuffer

Interface: FrameBuffer<T>

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

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:585

Type-only event map marker.

dispose

dispose: []

Inherited from

GPUObject.[EventMapType]


device

readonly device: AbstractDevice

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

The object was created by which device

Inherited from

GPUObject.device


object

readonly object: T

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

The internal GPU object

Inherited from

GPUObject.object


uid

readonly uid: number

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

unique id

Inherited from

GPUObject.uid


cid

readonly cid: number

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

Inherited from

GPUObject.cid


disposed

readonly disposed: boolean

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

Inherited from

GPUObject.disposed


name

name: string

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

Inherited from

GPUObject.name


restoreHandler

restoreHandler: (tex) => void

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

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:592

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:599

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:605

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:611

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:1280

Returns

this is VertexLayout<unknown>

Inherited from

GPUObject.isVertexLayout


isFramebuffer()

isFramebuffer(): this is FrameBuffer<unknown>

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

Returns

this is FrameBuffer<unknown>

Inherited from

GPUObject.isFramebuffer


isSampler()

isSampler(): this is TextureSampler<unknown>

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

Returns

this is TextureSampler<unknown>

Inherited from

GPUObject.isSampler


isTexture()

isTexture(): this is BaseTexture<unknown>

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

Returns

this is BaseTexture<unknown>

Inherited from

GPUObject.isTexture


isTexture2D()

isTexture2D(): this is Texture2D<unknown>

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

Returns

this is Texture2D<unknown>

Inherited from

GPUObject.isTexture2D


isTexture2DArray()

isTexture2DArray(): this is Texture2DArray<unknown>

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

Returns

this is Texture2DArray<unknown>

Inherited from

GPUObject.isTexture2DArray


isTexture3D()

isTexture3D(): this is Texture3D<unknown>

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

Returns

this is Texture3D<unknown>

Inherited from

GPUObject.isTexture3D


isTextureCube()

isTextureCube(): this is TextureCube<unknown>

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

Returns

this is TextureCube<unknown>

Inherited from

GPUObject.isTextureCube


isTextureVideo()

isTextureVideo(): this is TextureVideo<unknown>

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

Returns

this is TextureVideo<unknown>

Inherited from

GPUObject.isTextureVideo


isProgram()

isProgram(): this is GPUProgram<unknown>

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

Returns

this is GPUProgram<unknown>

Inherited from

GPUObject.isProgram


isBuffer()

isBuffer(): this is GPUDataBuffer<unknown>

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

Returns

this is GPUDataBuffer<unknown>

Inherited from

GPUObject.isBuffer


isBindGroup()

isBindGroup(): this is BindGroup

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

Returns

this is BindGroup

Inherited from

GPUObject.isBindGroup


dispose()

dispose(): void

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

Returns

void

Inherited from

GPUObject.dispose


reload()

reload(): void

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

Returns

void

Inherited from

GPUObject.reload


destroy()

destroy(): void

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

Returns

void

Inherited from

GPUObject.destroy


restore()

restore(): void

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

Returns

void

Inherited from

GPUObject.restore


getWidth()

getWidth(): number

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

Returns

number


getHeight()

getHeight(): number

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

Returns

number


getSampleCount()

getSampleCount(): number

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

Returns

number


getHash()

getHash(): string

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

Returns

string


setColorAttachmentCubeFace()

setColorAttachmentCubeFace(index, face): void

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

Parameters

index

number

face

CubeFace

Returns

void


getColorAttachmentCubeFace()

getColorAttachmentCubeFace(index): CubeFace

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

Parameters

index

number

Returns

CubeFace


setColorAttachmentMipLevel()

setColorAttachmentMipLevel(index, level): void

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

Parameters

index

number

level

number

Returns

void


getColorAttachmentMipLevel()

getColorAttachmentMipLevel(index): number

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

Parameters

index

number

Returns

number


setColorAttachmentLayer()

setColorAttachmentLayer(index, layer): void

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

Parameters

index

number

layer

number

Returns

void


getColorAttachmentLayer()

getColorAttachmentLayer(index): number

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

Parameters

index

number

Returns

number


setColorAttachmentGenerateMipmaps()

setColorAttachmentGenerateMipmaps(index, generateMipmaps): void

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

Parameters

index

number

generateMipmaps

boolean

Returns

void


getColorAttachmentGenerateMipmaps()

getColorAttachmentGenerateMipmaps(index): boolean

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

Parameters

index

number

Returns

boolean


setDepthAttachmentCubeFace()

setDepthAttachmentCubeFace(face): void

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

Parameters

face

CubeFace

Returns

void


getDepthAttachmentCubeFace()

getDepthAttachmentCubeFace(): CubeFace

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

Returns

CubeFace


setDepthAttachmentLayer()

setDepthAttachmentLayer(layer): void

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

Parameters

layer

number

Returns

void


getDepthAttachmentLayer()

getDepthAttachmentLayer(): number

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

Returns

number


getColorAttachments()

getColorAttachments(): BaseTexture<unknown>[]

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

Returns

BaseTexture<unknown>[]


getDepthAttachment()

getDepthAttachment(): BaseTexture<unknown>

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

Returns

BaseTexture<unknown>


getColorAttachment()

getColorAttachment<T>(index): T

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

Type Parameters

T

T extends BaseTexture<unknown> = BaseTexture<unknown>

Parameters

index

number

Returns

T


bind()

bind(): boolean

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

Returns

boolean


unbind()

unbind(): void

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

Returns

void

Released under the MIT License.