java.lang.Object
com.marginallyclever.ro3.factories.Factory
com.marginallyclever.ro3.texture.TextureFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoad a texture from a file.getResources(Lifetime lifetime) voidClears any cached resources that are not meant to persist for the lifetime of the application.voidunloadAll(com.jogamp.opengl.GL3 gl) Unloads all OpenGL textures so that they can be reloaded on the next call toGLAutoDrawable.display().Methods inherited from class com.marginallyclever.ro3.factories.Factory
addItemListener, removeItemListener
-
Constructor Details
-
TextureFactory
public TextureFactory()
-
-
Method Details
-
get
Load a texture from a file.- Parameters:
lifetime- the lifetime of the texture.filename- the file to load.- Returns:
- the texture, or null if the file could not be loaded.
-
unloadAll
public void unloadAll(com.jogamp.opengl.GL3 gl) Unloads all OpenGL textures so that they can be reloaded on the next call to
GLAutoDrawable.display(). Does not free the underlyingBufferedImagedata.if this is called from a thread that has no OpenGL context a
GLExceptionwill occur. -
getAllSourcesForExport
-
getResources
-
getAllResources
-
getAllExtensions
-
removeSceneResources
public void removeSceneResources()Description copied from class:FactoryClears any cached resources that are not meant to persist for the lifetime of the application. Typically, this would clear resources with a lifetime of SCENE, while retaining those with a lifetime of APPLICATION.- Specified by:
removeSceneResourcesin classFactory
-