Class PostProcessorEffect
java.lang.Object
gaiasky.util.gdx.contrib.postprocess.PostProcessorEffect
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
- Direct Known Subclasses:
AccumulationBlur
,AnaglyphEffect
,Antialiasing
,Bloom
,CameraMotion
,ChromaticAberration
,CrtMonitor
,CubmeapProjectionEffect
,Curvature
,DepthBuffer
,DrawTexture
,GravitationalDistortion
,LensFlare
,Levels
,LightGlow
,LightScattering
,Mosaic
,PseudoLensFlare
,Raymarching
,Reprojection
,SSR
,UnsharpMask
,Vignette
,WarpingMesh
,XBRZ
,Zoomer
public abstract class PostProcessorEffect
extends Object
implements com.badlogic.gdx.utils.Disposable
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.badlogic.gdx.utils.Array
<com.badlogic.gdx.utils.Disposable> Array of disposables.protected boolean
protected boolean
protected boolean
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Default implementation uses the resources in the disposables list.boolean
Whether this effect is enabled and should be processed.boolean
boolean
abstract void
rebind()
Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost.abstract void
render
(com.badlogic.gdx.graphics.glutils.FrameBuffer src, com.badlogic.gdx.graphics.glutils.FrameBuffer dest, GaiaSkyFrameBuffer main) Concrete objects shall implement its own rendering, given the source and destination buffers.protected void
restoreViewport
(com.badlogic.gdx.graphics.glutils.FrameBuffer dest) Convenience method to forward the call to the PostProcessor object while still being a non-publicly accessible method.void
setEnabled
(boolean enabled) Sets this effect enabled or not.void
setEnabledInCubemap
(boolean enabled) void
setEnabledInVR
(boolean enabled) void
setEnabledOptions
(boolean enabledInCubemap, boolean enabledInVR)
-
Field Details
-
enabled
protected boolean enabled -
enabledInCubemap
protected boolean enabledInCubemap -
enabledInVR
protected boolean enabledInVR -
disposables
protected com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Disposable> disposablesArray of disposables. -
disposed
protected boolean disposed
-
-
Constructor Details
-
PostProcessorEffect
public PostProcessorEffect()
-
-
Method Details
-
rebind
public abstract void rebind()Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost. E.g., frame buffer textures should be updated and shader parameters should be re-uploaded/rebound. -
render
public abstract void render(com.badlogic.gdx.graphics.glutils.FrameBuffer src, com.badlogic.gdx.graphics.glutils.FrameBuffer dest, GaiaSkyFrameBuffer main) Concrete objects shall implement its own rendering, given the source and destination buffers. -
isEnabled
public boolean isEnabled()Whether this effect is enabled and should be processed. -
setEnabled
public void setEnabled(boolean enabled) Sets this effect enabled or not. -
isEnabledInCubemap
public boolean isEnabledInCubemap() -
isEnabledInVR
public boolean isEnabledInVR() -
setEnabledOptions
public void setEnabledOptions(boolean enabledInCubemap, boolean enabledInVR) -
setEnabledInCubemap
public void setEnabledInCubemap(boolean enabled) -
setEnabledInVR
public void setEnabledInVR(boolean enabled) -
restoreViewport
protected void restoreViewport(com.badlogic.gdx.graphics.glutils.FrameBuffer dest) Convenience method to forward the call to the PostProcessor object while still being a non-publicly accessible method. -
dispose
public void dispose()Default implementation uses the resources in the disposables list.- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-