Berserk
Classes | Public Member Functions | Static Public Attributes | List of all members
GLVaoCache Class Reference

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
 

Detailed Description

Cache of opengl vertex array objects.

Constructor & Destructor Documentation

◆ GLVaoCache()

BRK_NS_BEGIN GLVaoCache::GLVaoCache ( uint32  releaseFrequency = RELEASE_FREQUENCY,
uint32  timeToKeep = TIME_TO_KEEP 
)
explicit

◆ ~GLVaoCache()

GLVaoCache::~GLVaoCache ( )

Member Function Documentation

◆ GC()

void GLVaoCache::GC ( )

Erase cache entries which exceeded time to live

◆ GetOrCreateVao()

GLuint GLVaoCache::GetOrCreateVao ( const GLVaoDescriptor descriptor)

Attempts to look up and find suitable vao. If fails, creates new cache entry

Member Data Documentation

◆ RELEASE_FREQUENCY

const uint32 GLVaoCache::RELEASE_FREQUENCY = 4
static

◆ TIME_TO_KEEP

const uint32 GLVaoCache::TIME_TO_KEEP = 4
static

The documentation for this class was generated from the following files: