Package com.marginallyclever.ro3.texture
Class TextureFactory
java.lang.Object
com.marginallyclever.ro3.texture.TextureFactory
TextureFactory
loads textures from files.-
Constructor Details
-
TextureFactory
public TextureFactory()
-
-
Method Details
-
load
Load a texture from a file.- Parameters:
filename
- the file to load.- Returns:
- the texture, or null if the file could not be loaded.
-
unloadAll
public void unloadAll()Unloads all OpenGL textures so that they can be reloaded on the next call toGLAutoDrawable.display()
. Does not free the underlyingBufferedImage
data. -
getAllSourcesForExport
- Returns:
- a list of all the sources used to load textures.
-
getPool
- Returns:
- a list of all the textures loaded.
-
getAllExtensions
-
reset
public void reset()Remove all textures from the pool.
-