22#ifndef INCLUDED_VERTEXBUFFERMANAGER
23#define INCLUDED_VERTEXBUFFERMANAGER
62 explicit operator bool()
const {
return IsValid(); }
63 bool operator!()
const {
return !
static_cast<bool>(*this); }
94 const size_t vertexSize,
const size_t numberOfVertices,
Definition: VertexBufferManager.h:49
CVertexBuffer::VBChunk * operator->() const
Definition: VertexBufferManager.h:74
~Handle()
Definition: VertexBufferManager.h:59
CVertexBuffer::VBChunk * m_Chunk
Definition: VertexBufferManager.h:78
void Reset()
Definition: VertexBufferManager.cpp:98
CVertexBuffer::VBChunk & operator*() const
Definition: VertexBufferManager.h:73
Handle & operator=(const Handle &)=delete
friend void swap(Handle &lhs, Handle &rhs)
Definition: VertexBufferManager.h:66
Handle(const Handle &)=delete
bool operator!() const
Definition: VertexBufferManager.h:63
bool IsValid() const
Definition: VertexBufferManager.h:61
CVertexBuffer::VBChunk * Get() const
Definition: VertexBufferManager.h:75
Definition: VertexBufferManager.h:35
std::vector< std::unique_ptr< CVertexBuffer > > m_Buffers[static_cast< std::size_t >(Group::COUNT)]
List of all known vertex buffers.
Definition: VertexBufferManager.h:108
size_t GetBytesAllocated() const
Definition: VertexBufferManager.cpp:190
size_t GetBytesReserved() const
Definition: VertexBufferManager.cpp:181
CVertexBufferManager(Renderer::Backend::IDevice *device)
Definition: VertexBufferManager.h:37
Group
Definition: VertexBufferManager.h:40
Handle AllocateChunk(const size_t vertexSize, const size_t numberOfVertices, const Renderer::Backend::IBuffer::Type type, const uint32_t usage, void *backingStore=nullptr, Group group=Group::DEFAULT)
Try to allocate a vertex buffer of the given size and type.
Definition: VertexBufferManager.cpp:112
void Release(CVertexBuffer::VBChunk *chunk)
Returns the given chunk to its owning buffer.
Definition: VertexBufferManager.cpp:172
Renderer::Backend::IDevice * m_Device
Definition: VertexBufferManager.h:105
Type
Definition: IBuffer.h:35
#define DEFAULT(name)
Definition: mocks_test.cpp:29
Definition: VertexBuffer.h:65
uint32_t u32
Definition: types.h:39
unsigned int uint32_t
Definition: wposix_types.h:53