Class PerformanceMonitor

java.lang.Object
nl.colorize.multimedialib.scene.effect.PerformanceMonitor
All Implemented Interfaces:
Scene

public class PerformanceMonitor extends Object implements Scene
Depicts various performance statistics, both in terms of overall performance and on a frame-by-frame basis. When the widget is active, it will automatically capture and visualize every frame update. If the widget is marked as inactive, it will disable this logic, ironically in order to conserve performance.

This widget is included as part of the library so that it can be used as a debugging tool in applications.

  • Constructor Details

    • PerformanceMonitor

      public PerformanceMonitor(boolean detailed)
  • Method Details

    • start

      public void start(SceneContext context)
      Description copied from interface: Scene
      Initialization logic that should be performed when the scene is started. Note that this method is called *every* time the scene is started, not just the first time.

      This method is optional, the default implementation does nothing.

      Specified by:
      start in interface Scene
    • update

      public void update(SceneContext context, float deltaTime)
      Description copied from interface: Scene
      Called during every frame update for as long as the scene is active. deltaTime indicates the elapsed time since the last frame, in seconds.
      Specified by:
      update in interface Scene
    • setActive

      public void setActive(boolean active)
    • isActive

      public boolean isActive()