@EqualityReference public final class KFrustumMeshCache extends com.io7m.jcache.LRUCacheAbstract<KProjectionType,KFrustumMeshUsableType,KFrustumMesh,RException> implements KFrustumMeshCacheType
Modifier and Type | Method and Description |
---|---|
static com.io7m.jcache.LRUCacheConfig |
getCacheConfigFor(long count)
Construct a cache config that will cache at most
count
frustum meshes. |
static <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> |
newCache(G g,
com.io7m.jcanephora.ArrayBufferUpdateUnmappedConstructorType au_cons,
com.io7m.jcanephora.IndexBufferUpdateUnmappedConstructorType iu_cons,
com.io7m.jcache.LRUCacheConfig config,
com.io7m.jlog.LogUsableType log)
Construct a cache of frustum meshes.
|
static <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> |
newCacheWithCapacity(G g,
com.io7m.jcanephora.ArrayBufferUpdateUnmappedConstructorType au_cons,
com.io7m.jcanephora.IndexBufferUpdateUnmappedConstructorType iu_cons,
BigInteger count,
com.io7m.jlog.LogUsableType log)
Construct a cache of frustum meshes that will permit at most
count meshes to remain allocated. |
static KFrustumMeshCacheType |
wrap(com.io7m.jcache.LRUCacheType<KProjectionType,KFrustumMeshUsableType,KFrustumMesh,RException> c)
Wrap the given cache and expose a
KFrustumMeshCacheType
interface. |
cacheDelete, cacheEventsSubscribe, cacheEventsUnsubscribe, cacheGetConfiguration, cacheGetLU, cacheIsCached, cacheItemCount, cacheSetConfiguration, cacheSize, finalize
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> KFrustumMeshCacheType newCache(G g, com.io7m.jcanephora.ArrayBufferUpdateUnmappedConstructorType au_cons, com.io7m.jcanephora.IndexBufferUpdateUnmappedConstructorType iu_cons, com.io7m.jcache.LRUCacheConfig config, com.io7m.jlog.LogUsableType log)
G
- The precise type of OpenGL interfaceg
- The OpenGL implementationau_cons
- An array buffer update constructoriu_cons
- An index buffer update constructorconfig
- The cache configurationlog
- A log interfacepublic static com.io7m.jcache.LRUCacheConfig getCacheConfigFor(long count)
Construct a cache config that will cache at most count
frustum meshes. The maximum size of the cache will be
count *
bytes.
KFrustumMesh.getFrustumMeshSizeBytes()
count
- The number of meshes.public static <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> KFrustumMeshCacheType newCacheWithCapacity(G g, com.io7m.jcanephora.ArrayBufferUpdateUnmappedConstructorType au_cons, com.io7m.jcanephora.IndexBufferUpdateUnmappedConstructorType iu_cons, BigInteger count, com.io7m.jlog.LogUsableType log)
count
meshes to remain allocated.G
- The precise type of OpenGL interfaceg
- The OpenGL implementationau_cons
- An array buffer update constructoriu_cons
- An index buffer update constructorcount
- The maximum number of allocated meshes in the cache.log
- A log interfacepublic static KFrustumMeshCacheType wrap(com.io7m.jcache.LRUCacheType<KProjectionType,KFrustumMeshUsableType,KFrustumMesh,RException> c)
KFrustumMeshCacheType
interface.c
- The cacheCopyright © 2015 <code@io7m.com> http://io7m.com