com.threerings.opengl.util
Class ResourceCache

java.lang.Object
  extended by com.threerings.opengl.util.ResourceCache
Direct Known Subclasses:
ImageCache, ShaderCache

public abstract class ResourceCache
extends Object

Base class for the resource caches.


Nested Class Summary
protected static class ResourceCache.CachedResource<T>
          Contains a cached resource.
protected  class ResourceCache.Subcache<K,V>
          A cache for a single type of resource.
 
Field Summary
protected  boolean _checkTimestamps
          Whether or not to check resource file timestamps.
protected  GlContext _ctx
          The renderer context.
 
Constructor Summary
ResourceCache(GlContext ctx, boolean checkTimestamps)
          Creates a new resource cache.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected GlContext _ctx
The renderer context.


_checkTimestamps

protected boolean _checkTimestamps
Whether or not to check resource file timestamps.

Constructor Detail

ResourceCache

public ResourceCache(GlContext ctx,
                     boolean checkTimestamps)
Creates a new resource cache.

Parameters:
checkTimestamps - if true, check the last-modified timestamp of each resource file when we retrieve it from the cache, reloading the resource if the file has been modified externally.