Class SceneGraphRenderer

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, IProcessRenderer

public class SceneGraphRenderer extends AbstractRenderer implements IProcessRenderer, IObserver
Initializes the render infrastructure renders the scene using different render systems.
  • Field Details

    • visible

      public ComponentTypes visible
      Contains the flags representing each type's visibility
    • times

      public long[] times
      Contains the last update time of each of the flags
    • alphas

      public float[] alphas
      Alpha values for each type.
    • shadowMapFb

      public[][] shadowMapFb
    • smTexMap

      public Map<ModelBody,> smTexMap
    • smCombinedMap

      public Map<ModelBody,com.badlogic.gdx.math.Matrix4> smCombinedMap
  • Constructor Details

  • Method Details

    • initialize

      public void initialize(com.badlogic.gdx.assets.AssetManager manager)
      Description copied from interface: IProcessRenderer
      Initializes the renderer, sending all the necessary assets to the manager for loading
      Specified by:
      initialize in interface IProcessRenderer
      manager - The asset manager
    • doneLoading

      public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
      Description copied from interface: IProcessRenderer
      Actually initializes all the clockwork of this renderer using the assets in the given manager
      Specified by:
      doneLoading in interface IProcessRenderer
      manager - The asset manager
    • setRendering

      public void setRendering(boolean rendering)
    • renderListsFront

      public com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Array<IRenderable>> renderListsFront()
    • renderListsBack

      public com.badlogic.gdx.utils.Array<com.badlogic.gdx.utils.Array<IRenderable>> renderListsBack()
    • renderGlowPass

      public void renderGlowPass(ICamera camera, frameBuffer)
    • render

      public void render(ICamera camera, double t, int rw, int rh, int tw, int th, fb, IPostProcessor.PostProcessBean ppb)
      Description copied from interface: IProcessRenderer
      Renders the scene
      Specified by:
      render in interface IProcessRenderer
      camera - The camera to use
      t - The delta time computed in the update method in seconds
      rw - The width of the render buffer
      rh - The height of the render buffer
      tw - The final target width
      th - The final target height
      fb - The frame buffer to write to, if any
      ppb - The post process bean
    • getCurrentSGR

      public ISGR getCurrentSGR()
    • getGlowFb

      public getGlowFb()
    • renderScene

      public void renderScene(ICamera camera, double t, RenderingContext renderContext)
      Renders the scene.
      camera - The camera to use.
      t - The time in seconds since the start.
      renderContext - The render context.
    • renderSystem

      protected void renderSystem(ICamera camera, double t, RenderingContext renderContext, Class<? extends IRenderSystem> systemClass)
      Renders all the systems which are of the given class.
      camera - The camera to use.
      t - The time in seconds since the start.
      renderContext - The render context.
      systemClass - The class.
    • renderSystems

      protected void renderSystems(ICamera camera, double t, RenderingContext renderContext, Class<?>... systemClasses)
      Renders all the systems which are of one of the given classes.
      camera - The camera to use.
      t - The time in seconds since the start.
      renderContext - The render context.
      systemClasses - The classes.
    • swapRenderLists

      public void swapRenderLists()
      This must be called when all the rendering for the current frame has finished.
    • isOn

      public boolean isOn(ComponentTypes.ComponentType comp)
      Checks if a given component type is on
      comp - The component
      Whether the component is on
    • allOn

      public boolean allOn(ComponentTypes comp)
      Checks if the component types are all on
      comp - The components
      Whether the components are all on
    • isOn

      public boolean isOn(int ordinal)
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.
    • resize

      public void resize(int w, int h, int rw, int rh)
    • resize

      public void resize(int w, int h, int rw, int rh, boolean resizeRenderSys)
    • resizeRenderSystems

      public void resizeRenderSystems(int w, int h, int rw, int rh)
    • dispose

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

      public void updateLineRenderSystem()