|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextureCache
A representation of global cache for texture instance management.
This is the abstract representation of the cache functionality, which may be used across different renderer types. Look in the renderer-specific packages for details on the specific renderer API calls.
Different types of cache implementations are allowed (ie different ways of deciding when an texture no longer needs to be in the cache).
Internal storage and key management is using strings. The URLs are converted to string form as the key and used to look up items. The filenames are always relative to the classpath. If the filename/url has been loaded as an image component before and then a request is made for a texture, then the previously loaded component is used as the basis for the texture.
All fetch methods work in the same way - if the texture has not been previously loaded, then it will be loaded and converted to a BufferedImage using the utilities of this class.
Method Summary | |
---|---|
boolean |
checkTexture(java.lang.String filename)
Check to see if a filename is cached for a Texture. |
void |
clearAll()
Clear the entire cache now. |
void |
releaseTexture(java.lang.String filename)
Explicitly remove the named texture and image component from the cache. |
void |
releaseTexture(java.net.URL url)
Explicitly remove the named texture and image component from the cache. |
Method Detail |
---|
void releaseTexture(java.lang.String filename)
filename
- The name the texture was registered undervoid releaseTexture(java.net.URL url)
url
- The URL the texture was registered undervoid clearAll()
boolean checkTexture(java.lang.String filename)
filename
- The filename loaded
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |