Package arc.fx
Class FxFilter
java.lang.Object
arc.fx.FxFilter
- All Implemented Interfaces:
Disposable
- Direct Known Subclasses:
BiasFilter
,BloomFilter
,BlurFilter
,ChromaticAberrationFilter
,CombineFilter
,Convolve1dFilter
,CopyFilter
,CrtFilter
,FilmGrainFilter
,FisheyeDistortionFilter
,FxaaFilter
,HdrFilter
,LensFlareFilter
,LevelsFilter
,MixFilter
,MotionBlurFilter
,NfaaFilter
,NoiseFilter
,OldTvFilter
,RadialBlurFilter
,RadialDistortionFilter
,RippleFilter
,ThresholdFilter
,VignettingFilter
,ZoomFilter
Base class for any single-pass filter.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected Texture
protected FrameBuffer
protected final Shader
float
protected static final int
protected static final int
protected static final int
protected static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Shader
compileShader
(Fi vertexFile, Fi fragmentFile) static Shader
compileShader
(Fi vertexFile, Fi fragmentFile, String defines) void
dispose()
Releases all resources of this object.boolean
Whether or not this effect is disabled and shouldn't be processedprotected void
This method gets called just before rendering.void
rebind()
void
render()
void
render
(FrameBuffer src, FrameBuffer dst) Concrete objects shall implements its own rendering, given the source and destination buffers.void
resize
(int width, int height) This method should be called once filter will be added.void
setDisabled
(boolean enabled) Sets this effect disabled or notsetInput
(FrameBuffer input) setOutput
(FrameBuffer output) protected void
Concrete objects shall be responsible to recreate or rebind its own resources whenever its needed, usually when the OpenGL context is lost.void
update()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface arc.util.Disposable
isDisposed
-
Field Details
-
u_texture0
protected static final int u_texture0- See Also:
-
u_texture1
protected static final int u_texture1- See Also:
-
u_texture2
protected static final int u_texture2- See Also:
-
u_texture3
protected static final int u_texture3- See Also:
-
shader
-
inputTexture
-
outputBuffer
-
disabled
protected boolean disabled -
autobind
protected boolean autobind -
time
public float time
-
-
Constructor Details
-
FxFilter
public FxFilter() -
FxFilter
-
FxFilter
-
-
Method Details
-
compileShader
-
compileShader
-
setInput
-
setInput
-
setOutput
-
dispose
public void dispose()Description copied from interface:Disposable
Releases all resources of this object.- Specified by:
dispose
in interfaceDisposable
-
resize
public void resize(int width, int height) This method should be called once filter will be added. Also it must be called on every application resize as usual. -
rebind
public void rebind() -
setParams
protected void setParams()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 void render() -
onBeforeRender
protected void onBeforeRender()This method gets called just before rendering. -
render
Concrete objects shall implements its own rendering, given the source and destination buffers. -
isDisabled
public boolean isDisabled()Whether or not this effect is disabled and shouldn't be processed -
setDisabled
public void setDisabled(boolean enabled) Sets this effect disabled or not -
update
public void update()
-