Class AbstractRenderSystem

java.lang.Object
gaiasky.render.system.AbstractRenderSystem
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IRenderSystem
Direct Known Subclasses:
BillboardRenderer, FontRenderSystem, ImmediateModeRenderSystem, ModelRenderer, ParticleSystemRenderSystem, ShapeRenderer, TessellationRenderer

public abstract class AbstractRenderSystem extends Object implements IRenderSystem
  • Field Details

  • Constructor Details

  • Method Details

    • getRenderGroup

      public RenderGroup getRenderGroup()
      Specified by:
      getRenderGroup in interface IRenderSystem
    • render

      public void render(List<IRenderable> renderables, ICamera camera, double t, RenderingContext rc)
      Description copied from interface: IRenderSystem
      Renders the given list of renderable objects.
      Specified by:
      render in interface IRenderSystem
      Parameters:
      renderables - The list of objects to render.
      camera - The camera object.
      t - The time, in seconds, since the session start.
      rc - The rendering context object.
    • renderStud

      public abstract void renderStud(List<IRenderable> renderables, ICamera camera, double t)
    • addPreRunnables

      public void addPreRunnables(AbstractRenderSystem.RenderSystemRunnable... r)
    • addPostRunnables

      public void addPostRunnables(AbstractRenderSystem.RenderSystemRunnable... r)
    • run

      protected void run(com.badlogic.gdx.utils.Array<AbstractRenderSystem.RenderSystemRunnable> runnables, List<IRenderable> renderables, ICamera camera)
    • getAlpha

      public float getAlpha(IRenderable renderable)
      Computes the alpha opacity value of a given renderable using its component types
      Parameters:
      renderable - The renderable
      Returns:
      The alpha value as the product of all the alphas of its component types.
    • getAlpha

      public float getAlpha(com.badlogic.ashley.core.Entity entity)
    • getAlpha

      public float getAlpha(ComponentTypes ct)
    • resize

      public void resize(int w, int h)
      Description copied from interface: IRenderSystem
      Resize the current render target with the given width and height.
      Specified by:
      resize in interface IRenderSystem
      Parameters:
      w - The new width.
      h - The new height.
    • updateBatchSize

      public void updateBatchSize(int w, int h)
      Description copied from interface: IRenderSystem
      Updates the size of object batches, if any.
      Specified by:
      updateBatchSize in interface IRenderSystem
      Parameters:
      w - The new width.
      h - The new height.
    • addEffectsUniforms

      protected void addEffectsUniforms(ExtShaderProgram shaderProgram, ICamera camera)
    • addVRScale

      protected void addVRScale(ExtShaderProgram shaderProgram)
    • addRelativisticUniforms

      protected void addRelativisticUniforms(ExtShaderProgram shaderProgram, ICamera camera)
    • addGravWaveUniforms

      protected void addGravWaveUniforms(ExtShaderProgram shaderProgram)
    • addDepthBufferUniforms

      protected void addDepthBufferUniforms(ExtShaderProgram shaderProgram, ICamera camera)
      Uniforms needed to compute the logarithmic depth buffer. They never change, so only add if not present.
      Parameters:
      shaderProgram - The program.
      camera - The camera.
    • addPreviousFrameUniforms

      protected void addPreviousFrameUniforms(ExtShaderProgram shaderProgram, ICamera camera)
      Uniforms needed for the velocity buffer
      Parameters:
      shaderProgram - The program
      camera - The camera
    • getShaderProgram

      protected ExtShaderProgram getShaderProgram()
    • initShaderProgram

      protected void initShaderProgram()
      Initializes metadata or essential uniforms in the shader program.
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
    • resetFlags

      public void resetFlags()