Workspace 6.21.5
Public Member Functions | List of all members
WSGLTextureCache Class Reference

Class for caching textures.

#include <Rendering/OpenGL/wsgltexturecache.h>

Inheritance diagram for WSGLTextureCache:
[legend]

Public Member Functions

 WSGLTextureCache (WSGLBufferObjectCache &bufferObjectCache, int capacity=100)
 
PtrType createTexture (const QString &key)
 
- Public Member Functions inherited from ExpiryCache< QString, WSGLTexture >
 ExpiryCache (int capacity=100)
 
virtual ~ExpiryCache ()
 
int capacity () const
 
void clear ()
 
bool contains (const QString &key) const
 
int count () const
 
bool insert (const QString &key, const PtrType &item, int cost=0)
 
bool isEmpty () const
 
PtrType object (const QString &key) const
 
PtrType operator[] (const QString &key) const
 
void setCapacity (int capacity)
 
int size () const
 
PtrType take (const QString &key)
 
int totalCost () const
 

Additional Inherited Members

- Public Types inherited from ExpiryCache< QString, WSGLTexture >
typedef WSGLTexture ItemType
 
using PtrType = QSharedPointer< WSGLTexture >
 
using WeakPtrType = QWeakPointer< WSGLTexture >
 

Constructor & Destructor Documentation

◆ WSGLTextureCache()

WSGLTextureCache ( WSGLBufferObjectCache bufferObjectCache,
int  capacity = 100 
)
inline

Member Function Documentation

◆ createTexture()

PtrType createTexture ( const QString &  key)
inline
Parameters
keyThe key to reference the texture with.
Returns
A newly create WSGLTexture object associated with the cache.