Skip to content

Documentation / scene / RGTextureAllocator

Interface: RGTextureAllocator<TTexture>

Defined in: libs/scene/src/render/rendergraph/types.ts:364

Interface for allocating and releasing transient textures.

Framebuffers are released before their attachments at the same pass boundary. A released framebuffer must retain its attachments until texture release.

Type Parameters

TTexture

TTexture = BaseTexture

Methods

allocate()

allocate(desc, size, preferred?): TTexture

Defined in: libs/scene/src/render/rendergraph/types.ts:366

Allocate a transient texture, preferring a compatible prior allocation.

Parameters

desc

RGTextureDesc

size

RGResolvedSize

preferred?

TTexture

Returns

TTexture


release()

release(texture): void

Defined in: libs/scene/src/render/rendergraph/types.ts:369

Release a transient texture.

Parameters

texture

TTexture

Returns

void


retain()?

optional retain(texture): void

Defined in: libs/scene/src/render/rendergraph/types.ts:375

Retain a transient texture beyond graph execution. The external owner must later release it.

Parameters

texture

TTexture

Returns

void


allocateFramebuffer()?

optional allocateFramebuffer(desc): FrameBuffer

Defined in: libs/scene/src/render/rendergraph/types.ts:378

Allocate a framebuffer released by the executor.

Parameters

desc

RGFramebufferDesc

Returns

FrameBuffer


releaseFramebuffer()?

optional releaseFramebuffer(framebuffer): void

Defined in: libs/scene/src/render/rendergraph/types.ts:381

Release a temporary framebuffer.

Parameters

framebuffer

FrameBuffer

Returns

void

Released under the MIT License.