Class LightmapRenderer

java.lang.Object
graphics.renderer.Renderer
graphics.renderer.LightmapRenderer

public class LightmapRenderer extends Renderer
  • Constructor Details

    • LightmapRenderer

      public LightmapRenderer()
  • Method Details

    • init

      public void init()
      Description copied from class: Renderer
      Creates the renderer's shader and framebuffer
      Overrides:
      init in class Renderer
    • 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
    • add

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

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

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

      public void bindLightmap()