Package gaiasky.scene.system.render.draw
Class PointCloudRenderer
java.lang.Object
gaiasky.render.system.AbstractRenderSystem
gaiasky.render.system.ImmediateModeRenderSystem
gaiasky.scene.system.render.draw.PointCloudRenderer
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,IObserver
,IRenderSystem
,Comparable<IRenderSystem>
- Direct Known Subclasses:
ParticleSetPointRenderer
-
Nested Class Summary
Nested classes/interfaces inherited from class gaiasky.render.system.ImmediateModeRenderSystem
ImmediateModeRenderSystem.MeshData, ImmediateModeRenderSystem.OwnUsage
Nested classes/interfaces inherited from class gaiasky.render.system.AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable
-
Field Summary
Fields inherited from class gaiasky.render.system.ImmediateModeRenderSystem
auxMat, curr, inGpu, meshes, meshIdx, tempIndices, tempVerts
Fields inherited from class gaiasky.render.system.AbstractRenderSystem
alphas, aux3d, aux3f, comp, postRunners, preRunners, programs, rc, sceneRenderer
-
Constructor Summary
ModifierConstructorDescriptionprotected
PointCloudRenderer
(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] shaders) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
addMeshData
(int maxVerts) Adds a new mesh data to the meshes list and increases the mesh data indexprotected int
addMeshData
(int maxVerts, int maxIndices) Adds a new mesh data to the meshes list and increases the mesh data indexprotected abstract void
addVertexAttributes
(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes) Adds the required vertex attributes for this renderer to the given listprotected com.badlogic.gdx.graphics.VertexAttribute[]
Builds the vertex attributes array and returns itprotected void
protected abstract void
Computes the offset for each vertex attribute.protected void
postRenderObjects
(ExtShaderProgram shaderProgram, ICamera camera) protected void
preRenderObjects
(ExtShaderProgram shaderProgram, ICamera camera) protected void
renderObject
(ExtShaderProgram shaderProgram, IRenderable renderable) void
renderStud
(List<IRenderable> renderables, ICamera camera, double t) Methods inherited from class gaiasky.render.system.ImmediateModeRenderSystem
addAffineTransformUniforms, clearMeshData, clearMeshes, color, color, color, color, createMeshData, dispose, ensureTempIndicesSize, ensureTempVertsSize, getCount, getOffset, inGpu, setCount, setInGpu, setOffset, vertex
Methods inherited from class gaiasky.render.system.AbstractRenderSystem
addCameraUpCubemapMode, addDepthBufferUniforms, addEffectsUniforms, addGravWaveUniforms, addPostRunnables, addPreRunnables, addRelativisticUniforms, addVRScale, compareTo, getAlpha, getAlpha, getAlpha, getRenderGroup, getShaderProgram, getShaderProgram, initShaderProgram, render, resetFlags, resize, run, updateBatchSize
-
Constructor Details
-
PointCloudRenderer
protected PointCloudRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] shaders)
-
-
Method Details
-
initVertices
protected void initVertices()- Specified by:
initVertices
in classImmediateModeRenderSystem
-
addVertexAttributes
protected abstract void addVertexAttributes(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes) Adds the required vertex attributes for this renderer to the given list- Parameters:
attributes
- The list of attributes
-
buildVertexAttributes
protected com.badlogic.gdx.graphics.VertexAttribute[] buildVertexAttributes()Builds the vertex attributes array and returns it- Returns:
- The vertex attributes array
-
offsets
Computes the offset for each vertex attribute. The offsets will be used later in the render stage.- Parameters:
curr
- The current mesh data
-
addMeshData
protected int addMeshData(int maxVerts) Adds a new mesh data to the meshes list and increases the mesh data index- Parameters:
maxVerts
- The max number of vertices this mesh data can hold- Returns:
- The index of the new mesh data
-
addMeshData
protected int addMeshData(int maxVerts, int maxIndices) Adds a new mesh data to the meshes list and increases the mesh data index- Parameters:
maxVerts
- The max number of vertices this mesh data can holdmaxIndices
- The maximum number of indices this mesh data can hold- Returns:
- The index of the new mesh data
-
preRenderObjects
-
renderObject
-
postRenderObjects
-
renderStud
- Specified by:
renderStud
in classAbstractRenderSystem
-