Class PostProcessorEffect

java.lang.Object
gaiasky.util.gdx.contrib.postprocess.PostProcessorEffect
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Direct Known Subclasses:
AccumulationBlur, Anaglyphic, Antialiasing, Bloom, CameraMotion, CrtMonitor, CubemapProjections, Curvature, DepthBuffer, Fisheye, GeometryWarp, GravitationalDistortion, LensFlare2, Levels, LightGlow, LightScattering, Raymarching, UnsharpMask, Vignette, Zoomer

public abstract class PostProcessorEffect extends Object implements com.badlogic.gdx.utils.Disposable
This interface defines the base class for the concrete implementation of post-processor effects. An effect is considered enabled by default.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether or not this effect is enabled and should be processed
    abstract void
    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 implements 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.badlogic.gdx.utils.Disposable

    dispose
  • Field Details

    • enabled

      protected boolean enabled
  • 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. Eg., framebuffer textures should be updated and shader parameters should be reuploaded/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 implements its own rendering, given the source and destination buffers.
    • isEnabled

      public boolean isEnabled()
      Whether or not this effect is enabled and should be processed
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets this effect enabled or not
    • 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