11 #ifndef RE_BufferCache_h
12 #define RE_BufferCache_h
38 void setMaxSizeB(
int64 maxsize);
64 myCurSizeB =
SYSmax(0, myCurSizeB+delta_size);
73 void pruneUnusedBuffers();
83 {
return "OpenGL Vertex Cache"; }
92 {
return myCurSizeB - myUnusedSizeB; }
101 BufferPool myUsedBuffers;
102 UnusedBufferPool myUnusedBuffers;
103 UnusedBuffer *myLRUBufferList;
104 UnusedBuffer *myLRUBufferTail;
GLenum GLuint GLenum GLsizei const GLchar * buf
int64 utGetMinSize() const override
int64 utGetMaxSize() const override
bool utHasMaxSize() const override
optional - override if the cache has a well defined maximum size
virtual int64 utReduceCacheSizeBy(int64 amount)=0
int64 getCurSizeB() const
Current cache size, in bytes.
Wrapper around hboost::intrusive_ptr.
GLuint const GLchar * name
Common base class for various caches.
void updateBufferSize(int64 delta_size)
call if a cached buffer changes size, with the change in size.
int64 getMaxSizeB() const
Maximum cache size, in bytes.
void utSetMaxSize(int64 size) override
const char * utGetCacheName() const override
required - return the english name for this cache.
int64 utGetCurrentSize() const override
required - return the current cache size, in bytes