Package gaiasky.render.system
Class VariableGroupInstRenderSystem
java.lang.Object
gaiasky.render.system.AbstractRenderSystem
gaiasky.render.system.ImmediateModeRenderSystem
gaiasky.render.system.InstancedRenderSystem
gaiasky.render.system.VariableGroupInstRenderSystem
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,IObserver,IRenderSystem
Renders variable star groups using instancing via billboards with geometry (quads as two triangles).
-
Nested Class Summary
Nested classes/interfaces inherited from class gaiasky.render.system.ImmediateModeRenderSystem
ImmediateModeRenderSystem.MeshData, ImmediateModeRenderSystem.OwnUsageNested classes/interfaces inherited from class gaiasky.render.system.AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable -
Field Summary
FieldsFields inherited from class gaiasky.render.system.InstancedRenderSystem
tempInstanceAttribsFields inherited from class gaiasky.render.system.ImmediateModeRenderSystem
curr, inGpu, meshes, meshIdx, tempIndices, tempVertsFields inherited from class gaiasky.render.system.AbstractRenderSystem
alphas, aux, auxd, comp, postRunnables, preRunnables, programs, rc -
Constructor Summary
ConstructorsConstructorDescriptionVariableGroupInstRenderSystem(SceneGraphRenderer.RenderGroup rg, float[] alphas, ExtShaderProgram[] shaders) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAttributesDivisor0(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes) Adds the required vertex attributes for this renderer to the given list.protected voidaddAttributesDivisor1(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes) Adds the required vertex attributes for this renderer to the given list.protected voidvoidEvent notification call.protected voidComputes the offset for each vertex attribute.protected voidComputes the offset for each vertex attribute in the instanced array.protected voidpreRenderObjects(ExtShaderProgram shaderProgram, ICamera camera) protected voidrenderObject(ExtShaderProgram shaderProgram, IRenderable renderable) protected voidsetInGpu(IRenderable renderable, boolean state) Methods inherited from class gaiasky.render.system.InstancedRenderSystem
addMeshData, buildAttributesDivisor0, buildAttributesDivisor1, ensureInstanceAttribsSize, initializeModel, initVertices, postRenderObjects, renderStudMethods inherited from class gaiasky.render.system.ImmediateModeRenderSystem
clearMeshData, clearMeshes, color, color, color, color, createMeshData, dispose, ensureTempIndicesSize, ensureTempVertsSize, getCount, getOffset, inGpu, setCount, setOffset, vertexMethods inherited from class gaiasky.render.system.AbstractRenderSystem
addDepthBufferUniforms, addEffectsUniforms, addGravWaveUniforms, addPostRunnables, addPreRunnables, addPreviousFrameUniforms, addRelativisticUniforms, addVRScale, getAlpha, getAlpha, getRenderGroup, getShaderProgram, render, resize, run, updateBatchSize
-
Field Details
-
logger
-
MAX_VARI
public static final int MAX_VARI- See Also:
-
-
Constructor Details
-
VariableGroupInstRenderSystem
public VariableGroupInstRenderSystem(SceneGraphRenderer.RenderGroup rg, float[] alphas, ExtShaderProgram[] shaders)
-
-
Method Details
-
addAttributesDivisor0
protected void addAttributesDivisor0(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes) Description copied from class:InstancedRenderSystemAdds the required vertex attributes for this renderer to the given list. These attributes are added only once for all instances (divisor=0)- Specified by:
addAttributesDivisor0in classInstancedRenderSystem- Parameters:
attributes- The list of attributes with divisor=0
-
addAttributesDivisor1
protected void addAttributesDivisor1(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes) Description copied from class:InstancedRenderSystemAdds the required vertex attributes for this renderer to the given list. These attributes are added for every instance (divisor=1)- Specified by:
addAttributesDivisor1in classInstancedRenderSystem- Parameters:
attributes- The list of attributes with divisor=1
-
offsets0
Description copied from class:InstancedRenderSystemComputes the offset for each vertex attribute. The offsets will be used later in the render stage.- Specified by:
offsets0in classInstancedRenderSystem- Parameters:
curr- The current mesh data
-
offsets1
Description copied from class:InstancedRenderSystemComputes the offset for each vertex attribute in the instanced array. The offsets will be used later in the render stage.- Specified by:
offsets1in classInstancedRenderSystem- Parameters:
curr- The current mesh data
-
initShaderProgram
protected void initShaderProgram()- Specified by:
initShaderProgramin classImmediateModeRenderSystem
-
preRenderObjects
- Overrides:
preRenderObjectsin classInstancedRenderSystem
-
renderObject
- Overrides:
renderObjectin classInstancedRenderSystem
-
setInGpu
- Overrides:
setInGpuin classImmediateModeRenderSystem
-
notify
Description copied from interface:IObserverEvent notification call.
-