Skip to content

Documentation / scene / DevicePoolAllocator

Class: DevicePoolAllocator ​

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:7

Render graph allocator backed by the device resource pool.

Implements ​

Constructors ​

Constructor ​

new DevicePoolAllocator(device?): DevicePoolAllocator

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:10

Create an allocator using the given device or the global device.

Parameters ​

device? ​

AbstractDevice

Returns ​

DevicePoolAllocator

Methods ​

allocate() ​

allocate(desc, size, preferred?): Texture2D

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:14

Allocate a transient texture from the device pool.

Parameters ​

desc ​

RGTextureDesc

size ​

RGResolvedSize

preferred? ​

Texture2D

Returns ​

Texture2D

Implementation of ​

RGTextureAllocator.allocate


release() ​

release(texture): void

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:60

Release a transient texture to the pool.

Parameters ​

texture ​

Texture2D

Returns ​

void

Implementation of ​

RGTextureAllocator.release


retain() ​

retain(texture): void

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:66

Retain a pooled texture beyond graph execution.

Parameters ​

texture ​

Texture2D

Returns ​

void

Implementation of ​

RGTextureAllocator.retain


allocateFramebuffer() ​

allocateFramebuffer(desc): FrameBuffer

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:72

Allocate a temporary framebuffer from the pool.

Parameters ​

desc ​

RGFramebufferDesc

Returns ​

FrameBuffer

Implementation of ​

RGTextureAllocator.allocateFramebuffer


releaseFramebuffer() ​

releaseFramebuffer(framebuffer): void

Defined in: libs/scene/src/render/rendergraph/device_pool_allocator.ts:96

Release a temporary framebuffer to the pool.

Parameters ​

framebuffer ​

FrameBuffer

Returns ​

void

Implementation of ​

RGTextureAllocator.releaseFramebuffer

Released under the MIT License.