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
RGTextureAllocator<Texture2D>
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
size
preferred?
Texture2D
Returns
Texture2D
Implementation of
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
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
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
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