Class TextRenderer
java.lang.Object
gaiasky.render.system.AbstractRenderSystem
gaiasky.scene.system.render.draw.TextRenderer
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IRenderSystem, Comparable<IRenderSystem>
Render system for text labels. It uses a BitmapFont and a SpriteBatch to render labels in 3D space.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractRenderSystem
AbstractRenderSystem.RenderSystemRunnable -
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionTextRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtSpriteBatch batch, ExtShaderProgram program) TextRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtSpriteBatch batch, ExtShaderProgram program, BitmapFont fontDistanceField) -
Method Summary
Modifier and TypeMethodDescriptionvoidrenderStud(List<IRenderable> renderables, ICamera camera, double t) voidresize(int w, int h) Resize the current render target with the given width and height.voidupdateBatchSize(int w, int h) Updates the size of object batches, if any.Methods inherited from class AbstractRenderSystem
addCameraUpCubemapMode, addDepthBufferUniforms, addEffectsUniforms, addGravWaveUniforms, addMotionTrailsUniforms, addPostRunnables, addPreRunnables, addRelativisticUniforms, addVRScale, compareTo, dispose, getAlpha, getAlpha, getAlpha, getRenderGroup, getShaderProgram, getShaderProgram, initShaderProgram, render, runModifier 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.protected voidrun(com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> runnables, List<IRenderable> renderables, ICamera camera)
-
Field Details
-
fontDistanceField
-
-
Constructor Details
-
TextRenderer
public TextRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtSpriteBatch batch, ExtShaderProgram program) -
TextRenderer
public TextRenderer(SceneRenderer sceneRenderer, RenderGroup rg, float[] alphas, ExtSpriteBatch batch, ExtShaderProgram program, BitmapFont fontDistanceField)
-
-
Method Details
-
renderStud
- Specified by:
renderStudin classAbstractRenderSystem
-
resize
public void resize(int w, int h) Description copied from interface:IRenderSystemResize the current render target with the given width and height.- Specified by:
resizein interfaceIRenderSystem- Overrides:
resizein classAbstractRenderSystem- Parameters:
w- The new width.h- The new height.
-
updateBatchSize
public void updateBatchSize(int w, int h) Description copied from interface:IRenderSystemUpdates the size of object batches, if any.- Specified by:
updateBatchSizein interfaceIRenderSystem- Overrides:
updateBatchSizein classAbstractRenderSystem- Parameters:
w- The new width.h- The new height.
-