Class TextRenderer

java.lang.Object
graphics.renderer.Renderer
graphics.renderer.TextRenderer

public class TextRenderer extends Renderer
Author:
Asher Haun
  • Constructor Details

    • TextRenderer

      public TextRenderer()
  • Method Details

    • createShader

      protected Shader createShader()
      Create a shader
      Specified by:
      createShader in class Renderer
      Returns:
      the created shader
    • createFramebuffer

      protected Framebuffer createFramebuffer()
      Create a framebuffer
      Specified by:
      createFramebuffer in class Renderer
      Returns:
      the created Framebuffer
    • createBatch

      protected RenderBatch createBatch(int zIndex)
      Create a new Batch with appropriate parameters
      Specified by:
      createBatch in class Renderer
      Parameters:
      zIndex -
      Returns:
      a new batch
    • uploadUniforms

      protected void uploadUniforms(Shader shader)
      Upload uniforms to the shader
      Specified by:
      uploadUniforms in class Renderer
      Parameters:
      shader - the shader
    • rebuffer

      protected void rebuffer()
      Rebuffer all the data into batches
      Specified by:
      rebuffer in class Renderer
    • render

      public void render()
      Description copied from class: Renderer
      Loop through all render batches and render them
      Overrides:
      render in class Renderer
    • prepare

      protected void prepare()
      Description copied from class: Renderer
      Prepare for rendering. Do anything like setting background here.
      Specified by:
      prepare in class Renderer
    • add

      public void add(Text textObject)
      Add a Text object to this renderer
      Parameters:
      textObject - the Text with renderable glyphs
    • getMaxBatchSize

      public static int getMaxBatchSize()
    • remove

      public void remove(Text text)