Class DebugRenderer

java.lang.Object
graphics.renderer.Renderer
graphics.renderer.DebugRenderer

public class DebugRenderer extends Renderer

Azurite

Used to render debug materials, like collision hitboxes, raycasts, or test data in general. Only supports rendering lines.
  • Constructor Details

    • DebugRenderer

      public DebugRenderer()
  • 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 fbo
    • createBatch

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

      protected void uploadUniforms(Shader shader)
      Upload the required uniforms
      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
    • prepare

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

      public void add(GameObject gameObject)
      Add a gameObject to this renderer
      Overrides:
      add in class Renderer
      Parameters:
      gameObject - the gameObject
    • remove

      public void remove(GameObject gameObject)
      Remove a gameObject from this renderer
      Overrides:
      remove in class Renderer
      Parameters:
      gameObject - the gameObject