Berserk
|
Cache of opengl vertex array objects. More...
#include <GLVaoCache.hpp>
Public Member Functions | |
BRK_API | GLVaoCache (uint32 releaseFrequency=RELEASE_FREQUENCY, uint32 timeToKeep=TIME_TO_KEEP) |
BRK_API | ~GLVaoCache () |
BRK_API GLuint | GetOrCreateVao (const GLVaoDescriptor &descriptor) |
BRK_API void | GC () |
Static Public Attributes | |
static const uint32 | RELEASE_FREQUENCY = 4 |
static const uint32 | TIME_TO_KEEP = 4 |
Cache of opengl vertex array objects.
|
explicit |
GLVaoCache::~GLVaoCache | ( | ) |
void GLVaoCache::GC | ( | ) |
Erase cache entries which exceeded time to live
GLuint GLVaoCache::GetOrCreateVao | ( | const GLVaoDescriptor & | descriptor | ) |
Attempts to look up and find suitable vao. If fails, creates new cache entry
|
static |
|
static |