23#ifndef CACHED_CONTAINER_GPU_H_
24#define CACHED_CONTAINER_GPU_H_
57 void Unmap()
override;
void Map() override
Prepare the container for vertices updates.
bool m_isMapped
Flag saying if vertex buffer is currently mapped.
unsigned int GetBufferHandle() const override
Return handle to the vertex buffer.
bool m_useCopyBuffer
Flag saying whether it is safe to use glCopyBufferSubData.
virtual unsigned int AllItemsSize() const override
void Abandon() override
Give up ownership of any GL objects without deleting them.
bool IsMapped() const override
Return true if vertex buffer is currently mapped.
bool defragmentResizeStaged(unsigned int aNewSize)
Grow the buffer while keeping the peak video memory at max(old, new) rather than old + new,...
bool defragmentResizeMemcpy(unsigned int aNewSize)
void Unmap() override
Finish the vertices updates stage.
CACHED_CONTAINER_GPU(unsigned int aSize=DEFAULT_SIZE)
bool defragmentResize(unsigned int aNewSize) override
Remove empty spaces between chunks and optionally resizes the container.
unsigned int m_glBufferHandle
Vertex buffer handle.
CACHED_CONTAINER(unsigned int aSize=DEFAULT_SIZE)
static constexpr unsigned int DEFAULT_SIZE
Default initial size of a container (expressed in vertices)
The Cairo implementation of the graphics abstraction layer.