Class ImmediateModeRenderSystem
java.lang.Object
gaiasky.render.system.AbstractRenderSystem
gaiasky.render.system.ImmediateModeRenderSystem
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IRenderSystem, Comparable<IRenderSystem>
- Direct Known Subclasses:
InstancedRenderSystem, LineRenderSystem, ParticleEffectsRenderer, PointCloudRenderer, PointCloudRenderSystem, PointPrimitiveRenderSystem, PrimitiveVertexRenderSystem, StarSetPointRenderer, VariableSetPointRenderer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static classNested classes/interfaces inherited from class AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable -
Field Summary
FieldsModifier 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, sceneRenderer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImmediateModeRenderSystem(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] programs) protectedImmediateModeRenderSystem(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] programs, int tempVertsSize) -
Method Summary
Modifier 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 intgetOffset(IRenderable renderable) protected booleaninGpu(IRenderable renderable) protected abstract voidprotected 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, initShaderProgram, render, renderStud, resetFlags, resize, run, updateBatchSize
-
Field Details
-
meshIdx
protected int meshIdx -
meshes
-
curr
-
tempVerts
protected float[] tempVerts -
tempIndices
protected int[] tempIndices -
inGpu
-
auxMat
protected final com.badlogic.gdx.math.Matrix4 auxMat
-
-
Constructor Details
-
ImmediateModeRenderSystem
protected ImmediateModeRenderSystem(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] programs) -
ImmediateModeRenderSystem
protected ImmediateModeRenderSystem(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] programs, int tempVertsSize)
-
-
Method Details
-
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
-
clearMeshes
public void clearMeshes() -
clearMeshData
public void clearMeshData(int i) Clears the mesh data at the index i- Parameters:
i- The index of the mesh data to remove
-
initVertices
protected abstract void initVertices() -
inGpu
-
setInGpu
-
setOffset
-
getOffset
-
setCount
-
getCount
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classAbstractRenderSystem
-
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
-
ensureTempIndicesSize
protected void ensureTempIndicesSize(int size) This function makes sure that the tempIndices array has at least the given size. After calling this function, the elements of tempIndices 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) -
addAffineTransformUniforms
-