Class AbstractRenderSystem
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.render.system.AbstractRenderSystem
-
- All Implemented Interfaces:
IRenderSystem
- Direct Known Subclasses:
BillboardSpriteRenderSystem,BillboardStarRenderSystem,FontRenderSystem,ImmediateRenderSystem,ModelBatchRenderSystem,ModelBatchTessellationRenderSystem,ShapeRenderSystem
public abstract class AbstractRenderSystem extends java.lang.Object implements IRenderSystem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractRenderSystem.RenderSystemRunnable
-
Field Summary
Fields Modifier and Type Field Description protected float[]alphasprotected com.badlogic.gdx.math.Vector3auxprotected java.util.Comparator<IRenderable>compComparator of renderables, in case of needstatic booleanPOINT_UPDATE_FLAGWhen this is true, new point information is available, so new data is streamed to the GPUprotected com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable>postRunnablesprotected com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable>preRunnablesprotected ExtShaderProgram[]programsRenderingContextrc
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRenderSystem(SceneGraphNode.RenderGroup rg, float[] alphas, ExtShaderProgram[] programs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddDepthBufferUniforms(ExtShaderProgram shaderProgram, ICamera camera)protected voidaddEffectsUniforms(ExtShaderProgram shaderProgram, ICamera camera)protected voidaddGravWaveUniforms(ExtShaderProgram shaderProgram)voidaddPostRunnables(AbstractRenderSystem.RenderSystemRunnable... r)voidaddPreRunnables(AbstractRenderSystem.RenderSystemRunnable... r)protected voidaddRelativisticUniforms(ExtShaderProgram shaderProgram, ICamera camera)floatgetAlpha(ComponentTypes ct)floatgetAlpha(IRenderable renderable)Computes the alpha opacity value of a given renderable using its component typesSceneGraphNode.RenderGroupgetRenderGroup()protected ExtShaderProgramgetShaderProgram()voidrender(com.badlogic.gdx.utils.Array<IRenderable> renderables, ICamera camera, double t, RenderingContext rc)abstract voidrenderStud(com.badlogic.gdx.utils.Array<IRenderable> renderables, ICamera camera, double t)voidresize(int w, int h)protected voidrun(com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> runnables, com.badlogic.gdx.utils.Array<IRenderable> renderables, ICamera camera)voidupdateBatchSize(int w, int h)
-
-
-
Field Detail
-
POINT_UPDATE_FLAG
public static boolean POINT_UPDATE_FLAG
When this is true, new point information is available, so new data is streamed to the GPU
-
programs
protected ExtShaderProgram[] programs
-
alphas
protected float[] alphas
-
comp
protected java.util.Comparator<IRenderable> comp
Comparator of renderables, in case of need
-
rc
public RenderingContext rc
-
aux
protected com.badlogic.gdx.math.Vector3 aux
-
preRunnables
protected com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> preRunnables
-
postRunnables
protected com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> postRunnables
-
-
Constructor Detail
-
AbstractRenderSystem
protected AbstractRenderSystem(SceneGraphNode.RenderGroup rg, float[] alphas, ExtShaderProgram[] programs)
-
-
Method Detail
-
getRenderGroup
public SceneGraphNode.RenderGroup getRenderGroup()
- Specified by:
getRenderGroupin interfaceIRenderSystem
-
render
public void render(com.badlogic.gdx.utils.Array<IRenderable> renderables, ICamera camera, double t, RenderingContext rc)
- Specified by:
renderin interfaceIRenderSystem
-
renderStud
public abstract void renderStud(com.badlogic.gdx.utils.Array<IRenderable> renderables, ICamera camera, double t)
-
addPreRunnables
public void addPreRunnables(AbstractRenderSystem.RenderSystemRunnable... r)
-
addPostRunnables
public void addPostRunnables(AbstractRenderSystem.RenderSystemRunnable... r)
-
run
protected void run(com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> runnables, com.badlogic.gdx.utils.Array<IRenderable> renderables, ICamera camera)
-
getAlpha
public float getAlpha(IRenderable renderable)
Computes the alpha opacity value of a given renderable using its component types- Parameters:
renderable- The renderable- Returns:
- The alpha value as the product of all the alphas of its component types.
-
getAlpha
public float getAlpha(ComponentTypes ct)
-
resize
public void resize(int w, int h)- Specified by:
resizein interfaceIRenderSystem
-
updateBatchSize
public void updateBatchSize(int w, int h)- Specified by:
updateBatchSizein interfaceIRenderSystem
-
addEffectsUniforms
protected void addEffectsUniforms(ExtShaderProgram shaderProgram, ICamera camera)
-
addRelativisticUniforms
protected void addRelativisticUniforms(ExtShaderProgram shaderProgram, ICamera camera)
-
addGravWaveUniforms
protected void addGravWaveUniforms(ExtShaderProgram shaderProgram)
-
addDepthBufferUniforms
protected void addDepthBufferUniforms(ExtShaderProgram shaderProgram, ICamera camera)
-
getShaderProgram
protected ExtShaderProgram getShaderProgram()
-
-