Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | List of all members
castor3d::UniformBufferPool Class Reference

#include <UniformBufferPool.hpp>

Inheritance diagram for castor3d::UniformBufferPool:
Inheritance graph
[legend]
Collaboration diagram for castor3d::UniformBufferPool:
Collaboration graph
[legend]

Classes

struct  Buffer
 

Public Types

using BufferArray = castor::Vector< Buffer >
 

Public Member Functions

C3D_API UniformBufferPool (RenderDevice const &device, castor::String debugName)
 Constructor.
 
C3D_API void cleanup ()
 Cleans up all GPU buffers.
 
C3D_API void upload (UploadData const &uploader) const
 Uploads all GPU buffers to VRAM.
 
template<typename DataT >
UniformBufferOffsetT< DataT > getBuffer (VkMemoryPropertyFlags flags)
 Retrieves a uniform buffer.
 
template<typename DataT >
void putBuffer (UniformBufferOffsetT< DataT > const &bufferOffset) noexcept
 Releases a GPU buffer.
 
C3D_API uint32_t getBufferCount () const
 
- Public Member Functions inherited from castor::OwnedBy< RenderSystem >
RenderSystem * getOwner () const
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< RenderSystem >
 OwnedBy (RenderSystem &owner)
 Constructor.
 

Member Typedef Documentation

◆ BufferArray

Constructor & Destructor Documentation

◆ UniformBufferPool()

C3D_API castor3d::UniformBufferPool::UniformBufferPool ( RenderDevice const & device,
castor::String debugName )

Constructor.

Parameters
[in]deviceThe GPU device.
[in]debugNameThe buffer debug name.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::UniformBufferPool::cleanup ( )

Cleans up all GPU buffers.

◆ getBuffer()

template<typename DataT >
UniformBufferOffsetT< DataT > castor3d::UniformBufferPool::getBuffer ( VkMemoryPropertyFlags flags)

Retrieves a uniform buffer.

Parameters
[in]flagsThe buffer memory flags.
Returns
The uniform buffer.

◆ getBufferCount()

C3D_API uint32_t castor3d::UniformBufferPool::getBufferCount ( ) const
Returns
The pool buffers count.

◆ putBuffer()

template<typename DataT >
void castor3d::UniformBufferPool::putBuffer ( UniformBufferOffsetT< DataT > const & bufferOffset)
noexcept

Releases a GPU buffer.

Parameters
[in]bufferOffsetThe buffer offset to release.

◆ upload()

C3D_API void castor3d::UniformBufferPool::upload ( UploadData const & uploader) const

Uploads all GPU buffers to VRAM.

Parameters
[in]uploaderReceives the upload requests.

The documentation for this class was generated from the following file: