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

#include <ObjectBufferPool.hpp>

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

Classes

struct  ModelBuffers
 

Public Types

using BufferArray = castor::Vector< ModelBuffers >
 

Public Member Functions

C3D_API IndexBufferPool (RenderDevice const &device, castor::String debugName)
 Constructor.
 
C3D_API void cleanup ()
 Cleans up all GPU buffers.
 
template<typename IndexT >
ObjectBufferOffset getBuffer (VkDeviceSize vertexCount)
 Retrieves a GPU buffer with the given size.
 
C3D_API void putBuffer (ObjectBufferOffset const &bufferOffset) noexcept
 Releases a GPU buffer.
 
- 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

◆ IndexBufferPool()

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

Constructor.

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

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::IndexBufferPool::cleanup ( )

Cleans up all GPU buffers.

◆ getBuffer()

template<typename IndexT >
ObjectBufferOffset castor3d::IndexBufferPool::getBuffer ( VkDeviceSize vertexCount)

Retrieves a GPU buffer with the given size.

Parameters
[in]vertexCountThe wanted buffer element count.
Returns
The GPU buffer.

◆ putBuffer()

C3D_API void castor3d::IndexBufferPool::putBuffer ( ObjectBufferOffset const & bufferOffset)
noexcept

Releases a GPU buffer.

Parameters
[in]bufferOffsetThe buffer offset to release.

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