Class HeadlessRenderer

java.lang.Object
dev.prozilla.pine.core.rendering.Renderer
dev.prozilla.pine.core.rendering.HeadlessRenderer
All Implemented Interfaces:
Destructible, Initializable

public class HeadlessRenderer extends Renderer
  • Constructor Details

    • HeadlessRenderer

      public HeadlessRenderer(Application application)
  • Method Details

    • init

      public void init()
      Description copied from interface: Initializable
      Initializes this object to prepare its usage.
      Specified by:
      init in interface Initializable
      Overrides:
      init in class Renderer
    • setRegion

      public void setRegion(int x, int y, int width, int height)
      Description copied from class: Renderer
      Limits the rendering to the given region.
      Overrides:
      setRegion in class Renderer
    • resetRegion

      public void resetRegion()
      Overrides:
      resetRegion in class Renderer
    • getTextHeight

      public int getTextHeight(Font font, CharSequence text)
      Description copied from class: Renderer
      Calculates total height of a text.
      Overrides:
      getTextHeight in class Renderer
      Parameters:
      text - The text
      Returns:
      Total width of the text
    • getTextWidth

      public int getTextWidth(Font font, CharSequence text)
      Description copied from class: Renderer
      Calculates total width of a text.
      Overrides:
      getTextWidth in class Renderer
      Parameters:
      text - The text
      Returns:
      Total width of the text
    • getDebugTextHeight

      public int getDebugTextHeight(CharSequence text)
      Description copied from class: Renderer
      Calculates total height of a debug text.
      Overrides:
      getDebugTextHeight in class Renderer
      Parameters:
      text - The text
      Returns:
      Total width of the text
    • getDebugTextWidth

      public int getDebugTextWidth(CharSequence text)
      Description copied from class: Renderer
      Calculates total width of a debug text.
      Overrides:
      getDebugTextWidth in class Renderer
      Parameters:
      text - The text
      Returns:
      Total width of the text
    • resize

      public void resize()
      Description copied from class: Renderer
      Updates the projection matrix according to the window's dimensions.
      Overrides:
      resize in class Renderer
    • flush

      public void flush()
      Description copied from class: Renderer
      Flushes the data to the GPU to let it get rendered.
      Overrides:
      flush in class Renderer
    • clear

      public void clear()
      Description copied from class: Renderer
      Clears the drawing area.
      Overrides:
      clear in class Renderer
    • drawText

      public void drawText(Font font, CharSequence text, float x, float y, float z)
      Description copied from class: Renderer
      Draw text at the specified position.
      Overrides:
      drawText in class Renderer
      Parameters:
      text - TextRenderer to draw
      x - X coordinate of the text position
      y - Y coordinate of the text position
    • drawDebugText

      public void drawDebugText(CharSequence text, float x, float y)
      Description copied from class: Renderer
      Draw debug text at the specified position.
      Overrides:
      drawDebugText in class Renderer
      Parameters:
      text - TextRenderer to draw
      x - X coordinate of the text position
      y - Y coordinate of the text position
    • drawTextureRegion

      public void drawTextureRegion(TextureAsset texture, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float z, float s1, float t1, float s2, float t2, Color c)
      Description copied from class: Renderer
      Draws a texture region on specified coordinates.
      Overrides:
      drawTextureRegion in class Renderer