Class Filter3<T>
java.lang.Object
gaiasky.util.gdx.contrib.postprocess.filters.Filter3<T>
- Direct Known Subclasses:
RaymarchingFilter
public abstract class Filter3<T>
extends java.lang.Object
The base class for any single-pass filter.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFilter3.Parameter -
Field Summary
Fields Modifier and Type Field Description protected com.badlogic.gdx.graphics.glutils.FrameBufferinputBufferprotected com.badlogic.gdx.graphics.TextureinputTextureprotected com.badlogic.gdx.graphics.glutils.FrameBufferoutputBufferprotected com.badlogic.gdx.graphics.glutils.ShaderProgramprogramprotected static FullscreenQuad3quadprotected static intu_texture0protected static intu_texture1protected static intu_texture2protected static intu_texture3 -
Constructor Summary
Constructors Constructor Description Filter3(com.badlogic.gdx.graphics.glutils.ShaderProgram program) -
Method Summary
Modifier and Type Method Description voiddispose()protected voidendParams()Should be called after any one or more setParams method calls.protected abstract voidonBeforeRender()This method will get called just before a rendering operation occurs.protected voidrealRender()abstract voidrebind()FIXME add commentvoidrender()TsetInput(com.badlogic.gdx.graphics.glutils.FrameBuffer input)TsetInput(com.badlogic.gdx.graphics.Texture input)TsetOutput(com.badlogic.gdx.graphics.glutils.FrameBuffer output)protected voidsetParam(Filter3.Parameter param, float value)protected voidsetParam(Filter3.Parameter param, int value)protected TsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Matrix3 value)protected TsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Matrix4 value)protected voidsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Vector2 value)protected voidsetParam(Filter3.Parameter param, com.badlogic.gdx.math.Vector3 value)protected TsetParams(Filter3.Parameter param, float value)Sets the parameter to the specified value for this filter.protected TsetParams(Filter3.Parameter param, int value)protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Matrix3 value)protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Matrix4 value)protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Vector2 value)protected TsetParams(Filter3.Parameter param, com.badlogic.gdx.math.Vector3 value)protected TsetParamsv(Filter3.Parameter param, float[] values, int offset, int length)protected TsetParamv(Filter3.Parameter param, float[] values, int offset, int length)voidupdateProgram(com.badlogic.gdx.graphics.glutils.ShaderProgram program)Caution, disposes of the current program and updates it with the new one.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
quad
-
u_texture0
protected static final int u_texture0- See Also:
- Constant Field Values
-
u_texture1
protected static final int u_texture1- See Also:
- Constant Field Values
-
u_texture2
protected static final int u_texture2- See Also:
- Constant Field Values
-
u_texture3
protected static final int u_texture3- See Also:
- Constant Field Values
-
inputTexture
protected com.badlogic.gdx.graphics.Texture inputTexture -
inputBuffer
protected com.badlogic.gdx.graphics.glutils.FrameBuffer inputBuffer -
outputBuffer
protected com.badlogic.gdx.graphics.glutils.FrameBuffer outputBuffer -
program
protected com.badlogic.gdx.graphics.glutils.ShaderProgram program
-
-
Constructor Details
-
Filter3
public Filter3(com.badlogic.gdx.graphics.glutils.ShaderProgram program)
-
-
Method Details
-
setInput
-
setInput
-
setOutput
-
updateProgram
public void updateProgram(com.badlogic.gdx.graphics.glutils.ShaderProgram program)Caution, disposes of the current program and updates it with the new one. Run synchronously after render().- Parameters:
program- The new shader program.
-
dispose
public void dispose() -
rebind
public abstract void rebind()FIXME add comment -
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
setParamv
-
setParams
Sets the parameter to the specified value for this filter. When you are finished building the batch you shall signal it by invoking endParams(). -
setParams
-
setParams
-
setParams
-
setParams
-
setParams
-
setParamsv
-
endParams
protected void endParams()Should be called after any one or more setParams method calls. -
onBeforeRender
protected abstract void onBeforeRender()This method will get called just before a rendering operation occurs. -
render
public final void render() -
realRender
protected void realRender()
-