Lysa  0.0
Lysa 3D Engine
StagingPool Class Reference

Detailed Description

Thread-safe pool of mapped BUFFER_UPLOAD buffers shared by a device.

Public Member Functions

 StagingPool (const std::shared_ptr< vireo::Vireo > &vireo, size_t maxCachedBytes)
 
std::shared_ptr< vireo::Buffer > acquire (size_t size)
 
std::shared_ptr< vireo::Buffer > acquire (size_t size, const vireo::CommandList &commandList)
 
void trim ()
 
 StagingPool (const StagingPool &) = delete
 
StagingPool & operator= (const StagingPool &) = delete
 

Constructor & Destructor Documentation

StagingPool ( const std::shared_ptr< vireo::Vireo > &  vireo,
size_t  maxCachedBytes 
)
explicit
StagingPool ( const StagingPool &  )
delete

Member Function Documentation

std::shared_ptr<vireo::Buffer> acquire ( size_t  size)

Acquire a mapped buffer of at least size bytes.

std::shared_ptr<vireo::Buffer> acquire ( size_t  size,
const vireo::CommandList &  commandList 
)

Acquire a mapped buffer retained by commandList until its next begin(), cleanup(), or destruction.

StagingPool& operator= ( const StagingPool &  )
delete
void trim ( )

Free cached idle buffers, without touching outstanding leases.