java.lang.Object
com.marginallyclever.ro3.factories.Factory
com.marginallyclever.ro3.shader.ShaderProgramFactory
Maintains a list of the loaded
ShaderProgram and prevents duplication. Also provides a centralized place to
destroy them when the OpenGL context goes away.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears any cached resources that are not meant to persist for the lifetime of the application.voidunloadAll(com.jogamp.opengl.GL3 gl3) Releases all shader programs.Methods inherited from class com.marginallyclever.ro3.factories.Factory
addItemListener, removeItemListener
-
Constructor Details
-
ShaderProgramFactory
public ShaderProgramFactory()
-
-
Method Details
-
get
-
unloadAll
public void unloadAll(com.jogamp.opengl.GL3 gl3) Releases all shader programs. This should be called when the OpenGL context is going away.- Parameters:
gl3- the GL3 context
-
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
-