java.lang.Object
technology.sola.engine.defaults.graphics.modules.SolaGraphicsModule
All Implemented Interfaces:
Comparable<SolaGraphicsModule>
Direct Known Subclasses:
ScreenSpaceLightMapGraphicsModule, SolaEntityGraphicsModule

@NullMarked public abstract class SolaGraphicsModule extends Object implements Comparable<SolaGraphicsModule>
SolaGraphicsModule adds additional rendering functionality to SolaGraphics.
  • Constructor Details

    • SolaGraphicsModule

      public SolaGraphicsModule()
  • Method Details

    • render

      public void render(Renderer renderer, technology.sola.ecs.World world, Matrix3D cameraScaleTransform, Matrix3D cameraTranslationTransform)
      The main render method for a graphics module that is called once per frame. It will call the renderMethod(Renderer, World, Matrix3D, Matrix3D) if the module is active.
      Parameters:
      renderer - tbe Renderer instance
      world - the World instance
      cameraScaleTransform - the camera's scale
      cameraTranslationTransform - the camera's translation
    • renderMethod

      public abstract void renderMethod(Renderer renderer, technology.sola.ecs.World world, Matrix3D cameraScaleTransform, Matrix3D cameraTranslationTransform)
      The specific render method for a graphics module that is called once per frame if active.
      Parameters:
      renderer - tbe Renderer instance
      world - the World instance
      cameraScaleTransform - the camera's scale
      cameraTranslationTransform - the camera's translation
    • isActive

      public boolean isActive()
      Returns:
      true if this graphics module is actively rendering
    • setActive

      public void setActive(boolean active)
      Sets the active state of this graphics module.
      Parameters:
      active - the new active state
    • getOrder

      public int getOrder()
      Gets the order of this graphics module. A higher value means it will be rendered on top.
      Returns:
      the order of this graphics module
    • compareTo

      public int compareTo(SolaGraphicsModule solaGraphicsModule)
      Specified by:
      compareTo in interface Comparable<SolaGraphicsModule>