32#ifndef VERTEX_CONTAINER_H_
33#define VERTEX_CONTAINER_H_
unsigned int m_initialSize
Actual storage memory.
static constexpr unsigned int DEFAULT_SIZE
virtual VERTEX * Allocate(unsigned int aSize)=0
Return allocated space for the requested number of vertices associated with the current item (set wit...
unsigned int m_currentSize
Store the initial size, so it can be resized to this on Clear()
unsigned int m_freeSpace
Current container size, expressed in vertices.
unsigned int usedSpace() const
Return size of the used memory space.
void SetDirty()
Set the dirty flag, so vertices in the container are going to be reuploaded to the GPU on the next fr...
bool m_dirty
Default initial size of a container (expressed in vertices)
virtual void SetItem(VERTEX_ITEM *aItem)=0
Set the item for the further actions.
virtual VERTEX * GetVertices(unsigned int aOffset) const
Return vertices stored at the specific offset.
virtual unsigned int GetSize() const
Return amount of vertices currently stored in the container.
virtual void FinishItem()
Clean up after adding an item.
virtual void Clear()=0
Remove all data stored in the container and restores its original state.
VERTEX * GetAllVertices() const
Return pointer to the vertices stored in the container.
virtual void Delete(VERTEX_ITEM *aItem)=0
Erase the data related to an item.
virtual void Unmap()
Finish the vertices updates stage.
virtual bool IsCached() const =0
Return true if the container caches vertex data in RAM or video memory.
static VERTEX_CONTAINER * MakeContainer(bool aCached)
Return a pointer to a new container of an appropriate type.
void ClearDirty()
Clear the dirty flag to prevent reuploading vertices to the GPU memory.
bool IsDirty() const
Return information about the container cache state.
virtual ~VERTEX_CONTAINER()
virtual void Map()
Prepare the container for vertices updates.
The Cairo implementation of the graphics abstraction layer.
Common defines and consts used in vertex related classes.