Class BillboardRenderer
java.lang.Object
gaiasky.render.system.AbstractRenderSystem
gaiasky.scene.system.render.draw.BillboardRenderer
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, IRenderSystem, Comparable<IRenderSystem>
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable -
Field Summary
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
ConstructorsConstructorDescriptionBillboardRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] shaderPrograms, String texturePath, boolean starTextureListener) Creates a new billboard quad render component.BillboardRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] programs, String texturePath, float w, float h, boolean starTextureListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidEvent notification call.voidrender(com.badlogic.ashley.core.Entity entity, ExtShaderProgram shader, IntMesh mesh, ICamera camera) Billboard quad render, for planets, stars, sso and sets.voidrenderStud(List<IRenderable> renderables, ICamera camera, double t) voidsetBillboardTexture(String texturePath) Methods inherited from class AbstractRenderSystem
addCameraUpCubemapMode, addDepthBufferUniforms, addEffectsUniforms, addGravWaveUniforms, addMotionTrailsUniforms, addPostRunnables, addPreRunnables, addRelativisticUniforms, addVRScale, compareTo, dispose, getAlpha, getAlpha, getAlpha, getRenderGroup, getShaderProgram, getShaderProgram, initShaderProgram, 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) intvoiddispose()floatgetAlpha(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) protected voidInitializes metadata or essential uniforms in the shader program.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.
-
Constructor Details
-
BillboardRenderer
public BillboardRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] programs, String texturePath, float w, float h, boolean starTextureListener) -
BillboardRenderer
public BillboardRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtShaderProgram[] shaderPrograms, String texturePath, boolean starTextureListener) Creates a new billboard quad render component.- Parameters:
rg- The render group.alphas- The alphas list.shaderPrograms- The shader programs to render the quad with.texturePath- The path to the texture to use for the billboards.starTextureListener- Whether to listen for star texture setting changes.
-
-
Method Details
-
setBillboardTexture
-
renderStud
- Specified by:
renderStudin classAbstractRenderSystem
-
render
public void render(com.badlogic.ashley.core.Entity entity, ExtShaderProgram shader, IntMesh mesh, ICamera camera) Billboard quad render, for planets, stars, sso and sets. -
notify
-