Package gaiasky.render.system
Class ImmediateRenderSystem
- java.lang.Object
-
- gaiasky.render.system.AbstractRenderSystem
-
- gaiasky.render.system.ImmediateRenderSystem
-
- All Implemented Interfaces:
IRenderSystem
- Direct Known Subclasses:
LineRenderSystem
,MWModelRenderSystem
,OrbitalElementsParticlesRenderSystem
,ParticleEffectsRenderSystem
,ParticleGroupRenderSystem
,PointRenderSystem
,StarGroupRenderSystem
,StarPointRenderSystem
,VertGPURenderSystem
public abstract class ImmediateRenderSystem extends AbstractRenderSystem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ImmediateRenderSystem.MeshData
-
Nested classes/interfaces inherited from class gaiasky.render.system.AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable
-
-
Field Summary
Fields Modifier and Type Field Description protected ImmediateRenderSystem.MeshData
curr
protected static Logger.Log
logger
protected com.badlogic.gdx.utils.Array<ImmediateRenderSystem.MeshData>
meshes
protected int
meshIdx
protected float[]
tempVerts
-
Fields inherited from class gaiasky.render.system.AbstractRenderSystem
alphas, aux, auxd, comp, POINT_UPDATE_FLAG, postRunnables, preRunnables, programs, rc
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImmediateRenderSystem(SceneGraphRenderer.RenderGroup rg, float[] alphas, ExtShaderProgram[] programs)
protected
ImmediateRenderSystem(SceneGraphRenderer.RenderGroup rg, float[] alphas, ExtShaderProgram[] programs, int tempVertsSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clearMeshData(int i)
Clears the mesh data at the index ivoid
color(double r, double g, double b, double a)
void
color(float colorBits)
void
color(float r, float g, float b, float a)
void
color(com.badlogic.gdx.graphics.Color color)
protected int
createMeshData()
Creates a new mesh data object and adds it to the first available index in the meshes arrayvoid
dispose()
protected void
ensureTempVertsSize(int size)
This function makes sure that the tempVerts array has at least the given size.protected abstract void
initShaderProgram()
protected abstract void
initVertices()
void
vertex(float x, float y, float z)
-
Methods inherited from class gaiasky.render.system.AbstractRenderSystem
addDepthBufferUniforms, addEffectsUniforms, addGravWaveUniforms, addPostRunnables, addPreRunnables, addPreviousFrameUniforms, addRelativisticUniforms, addVRScale, getAlpha, getAlpha, getRenderGroup, getShaderProgram, render, renderStud, resize, run, updateBatchSize
-
-
-
-
Field Detail
-
logger
protected static final Logger.Log logger
-
meshIdx
protected int meshIdx
-
meshes
protected com.badlogic.gdx.utils.Array<ImmediateRenderSystem.MeshData> meshes
-
curr
protected ImmediateRenderSystem.MeshData curr
-
tempVerts
protected float[] tempVerts
-
-
Constructor Detail
-
ImmediateRenderSystem
protected ImmediateRenderSystem(SceneGraphRenderer.RenderGroup rg, float[] alphas, ExtShaderProgram[] programs)
-
ImmediateRenderSystem
protected ImmediateRenderSystem(SceneGraphRenderer.RenderGroup rg, float[] alphas, ExtShaderProgram[] programs, int tempVertsSize)
-
-
Method Detail
-
createMeshData
protected int createMeshData()
Creates a new mesh data object and adds it to the first available index in the meshes array- Returns:
- The index of the new mesh data in meshes
-
clearMeshData
public void clearMeshData(int i)
Clears the mesh data at the index i- Parameters:
i
- The index of the mesh data to remove
-
initShaderProgram
protected abstract void initShaderProgram()
-
initVertices
protected abstract void initVertices()
-
dispose
public void dispose()
-
ensureTempVertsSize
protected void ensureTempVertsSize(int size)
This function makes sure that the tempVerts array has at least the given size. After calling this function, the elements of tempVerts may have been cleared.- Parameters:
size
- The size to ensure
-
color
public void color(com.badlogic.gdx.graphics.Color color)
-
color
public void color(float r, float g, float b, float a)
-
color
public void color(double r, double g, double b, double a)
-
color
public void color(float colorBits)
-
vertex
public void vertex(float x, float y, float z)
-
-