Class LineRenderSystem
java.lang.Object
gaiasky.render.system.AbstractRenderSystem
gaiasky.render.system.ImmediateModeRenderSystem
gaiasky.render.system.LineRenderSystem
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IRenderSystem, Comparable<IRenderSystem>
- Direct Known Subclasses:
LinePrimitiveRenderer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ImmediateModeRenderSystem
ImmediateModeRenderSystem.MeshData, ImmediateModeRenderSystem.OwnUsageModifier and TypeClassDescriptionstatic classprotected static classNested classes/interfaces inherited from class AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.badlogic.gdx.math.Vector3protected ICameraprotected static final Logger.LogFields inherited from class ImmediateModeRenderSystem
auxMat, curr, inGpu, meshes, meshIdx, tempIndices, tempVertsModifier and TypeFieldDescriptionprotected final com.badlogic.gdx.math.Matrix4protected ImmediateModeRenderSystem.MeshDataprotected Set<IRenderable> protected com.badlogic.gdx.utils.Array<ImmediateModeRenderSystem.MeshData> protected intprotected int[]protected float[]Fields inherited from class AbstractRenderSystem
alphas, aux3f, comp, postRunners, preRunners, programs, rc, sceneRendererModifier and TypeFieldDescriptionprotected final float[]protected final com.badlogic.gdx.math.Vector3protected Comparator<IRenderable> Comparator of renderables, in case of needprotected com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> protected com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> protected final ExtShaderProgram[]protected final SceneRenderer -
Constructor Summary
ConstructorsConstructorDescriptionLineRenderSystem(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] shaders) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, float r, float g, float b, float a) voidaddLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, float r0, float g0, float b0, float a0, float r1, float g1, float b1, float a1) voidaddLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, com.badlogic.gdx.graphics.Color col) voidaddLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, com.badlogic.gdx.graphics.Color col0, com.badlogic.gdx.graphics.Color col1) voidaddLinePostproc(double x0, double y0, double z0, double x1, double y1, double z1, double r, double g, double b, double a) voidaddLinePostproc(double x0, double y0, double z0, double x1, double y1, double z1, double r0, double g0, double b0, double a0, double r1, double g1, double b1, double a1) voidaddPoint(ILineRenderable lr, double x, double y, double z, float r, float g, float b, float a) voidBreaks current line of pointsprotected com.badlogic.gdx.graphics.VertexAttribute[]protected voidInitializes metadata or essential uniforms in the shader program.protected voidprotected voidinitVertices(int index) voidrenderStud(List<IRenderable> renderables, ICamera camera, double t) Methods inherited from class ImmediateModeRenderSystem
addAffineTransformUniforms, clearMeshData, clearMeshes, color, color, color, color, createMeshData, dispose, ensureTempIndicesSize, ensureTempVertsSize, getCount, getCounts, getOffset, getOffsets, inGpu, setCount, setInGpu, setOffset, vertexModifier and TypeMethodDescriptionprotected voidaddAffineTransformUniforms(ExtShaderProgram program, AffineTransformations affine) voidclearMeshData(int i) Clears the mesh data at the index ivoidvoidcolor(double r, double g, double b, double a) voidcolor(float colorBits) voidcolor(float r, float g, float b, float a) voidcolor(com.badlogic.gdx.graphics.Color color) protected intCreates a new mesh data object and adds it to the first available index in the meshes arrayvoiddispose()protected voidensureTempIndicesSize(int size) This function makes sure that the tempIndices array has at least the given size.protected voidensureTempVertsSize(int size) This function makes sure that the tempVerts array has at least the given size.protected intgetCount(IRenderable renderable) protected com.badlogic.gdx.utils.IntArraygetCounts(IRenderable renderable) protected intgetOffset(IRenderable renderable) protected com.badlogic.gdx.utils.IntArraygetOffsets(IRenderable renderable) protected booleaninGpu(IRenderable renderable) protected voidsetCount(IRenderable renderable, int count) protected voidsetInGpu(IRenderable renderable, boolean state) protected voidsetOffset(IRenderable renderable, int offset) voidvertex(float x, float y, float z) Methods inherited from class AbstractRenderSystem
addCameraUpCubemapMode, addDepthBufferUniforms, addEffectsUniforms, addGravWaveUniforms, addMotionTrailsUniforms, addPostRunnables, addPreRunnables, addRelativisticUniforms, addVRScale, compareTo, getAlpha, getAlpha, getAlpha, getRenderGroup, getShaderProgram, getShaderProgram, render, resize, run, updateBatchSizeModifier and TypeMethodDescriptionprotected voidaddCameraUpCubemapMode(ExtShaderProgram shaderProgram, ICamera camera) Adds the camera up vector (only in non-cubemap mode) to compute the billboard rotation.voidaddDepthBufferUniforms(ExtShaderProgram shaderProgram, ICamera camera) Uniforms needed to compute the logarithmic depth buffer.protected voidaddEffectsUniforms(ExtShaderProgram shaderProgram, ICamera camera) protected voidaddGravWaveUniforms(ExtShaderProgram shaderProgram) protected voidaddMotionTrailsUniforms(ExtShaderProgram shaderProgram, ICamera camera) Uniforms related to the motion trails effect for particle and star groups.voidvoidprotected voidaddRelativisticUniforms(ExtShaderProgram shaderProgram, ICamera camera) protected voidaddVRScale(ExtShaderProgram shaderProgram) intfloatgetAlpha(com.badlogic.ashley.core.Entity entity) floatgetAlpha(IRenderable renderable) Computes the alpha opacity value of a given renderable using its component typesfloatprotected ExtShaderProgramprotected ExtShaderProgramgetShaderProgram(ExtShaderProgram[] programs) voidrender(List<IRenderable> renderables, ICamera camera, double t, RenderingContext rc) Renders the given list of renderable objects.voidresize(int w, int h) Resize the current render target with the given width and height.protected voidrun(com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> runnables, List<IRenderable> renderables, ICamera camera) voidupdateBatchSize(int w, int h) Updates the size of object batches, if any.
-
Field Details
-
logger
-
camera
-
aux2
protected com.badlogic.gdx.math.Vector3 aux2
-
-
Constructor Details
-
LineRenderSystem
public LineRenderSystem(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] shaders)
-
-
Method Details
-
initShaderProgram
protected void initShaderProgram()Description copied from class:AbstractRenderSystemInitializes metadata or essential uniforms in the shader program.- Overrides:
initShaderProgramin classAbstractRenderSystem
-
initVertices
protected void initVertices()- Specified by:
initVerticesin classImmediateModeRenderSystem
-
initVertices
protected void initVertices(int index) -
buildVertexAttributes
protected com.badlogic.gdx.graphics.VertexAttribute[] buildVertexAttributes() -
renderStud
- Specified by:
renderStudin classAbstractRenderSystem
-
breakLine
public void breakLine()Breaks current line of points -
addPoint
public void addPoint(ILineRenderable lr, double x, double y, double z, float r, float g, float b, float a) -
addLine
public void addLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, com.badlogic.gdx.graphics.Color col0, com.badlogic.gdx.graphics.Color col1) -
addLine
public void addLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, com.badlogic.gdx.graphics.Color col) -
addLine
public void addLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, float r0, float g0, float b0, float a0, float r1, float g1, float b1, float a1) -
addLine
public void addLine(ILineRenderable lr, double x0, double y0, double z0, double x1, double y1, double z1, float r, float g, float b, float a) -
addLinePostproc
public void addLinePostproc(double x0, double y0, double z0, double x1, double y1, double z1, double r, double g, double b, double a) -
addLinePostproc
public void addLinePostproc(double x0, double y0, double z0, double x1, double y1, double z1, double r0, double g0, double b0, double a0, double r1, double g1, double b1, double a1)
-