Class GraphicsBenchmark

java.lang.Object
eu.svjatoslav.aukio.e3d.examples.benchmark.GraphicsBenchmark
All Implemented Interfaces:
eu.svjatoslav.aukio.e3d.gui.FrameListener, eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler

public class GraphicsBenchmark extends Object implements eu.svjatoslav.aukio.e3d.gui.FrameListener, eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
Automated graphics benchmark that tests the engine's rendering performance. Runs multiple tests sequentially, each for a fixed duration, and displays results in a dialog with copy-to-clipboard functionality.

The benchmark creates a 16x16x16 grid of cubes (4096 total) with the camera following a deterministic orbital path. Each test runs for 30 seconds by default.

Press Space to skip to the next test immediately.

Available tests:

  • Constructor Summary

    Constructors
    Constructor
    Description
    GraphicsBenchmark(eu.svjatoslav.aukio.e3d.examples.benchmark.GraphicsBenchmark.BenchmarkMode mode)
    Constructs and runs the graphics benchmark.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    buildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera)
    Builds the default benchmark scene: the first test's 16x16x16 cube grid (SolidCubesTest, the scene shown on launch) with the camera at its initial position.
    boolean
    focusLost(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
     
    boolean
    focusReceived(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
     
    boolean
    keyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
     
    boolean
    keyReleased(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
     
    static void
    main(String[] args)
    Entry point for the graphics benchmark.
    boolean
    onFrame(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel, int millisecondsSinceLastFrame)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraphicsBenchmark

      public GraphicsBenchmark(eu.svjatoslav.aukio.e3d.examples.benchmark.GraphicsBenchmark.BenchmarkMode mode)
      Constructs and runs the graphics benchmark.
      Parameters:
      mode - SHORT for single run, EXTENDED for multi-thread-count run
  • Method Details

    • main

      public static void main(String[] args)
      Entry point for the graphics benchmark.
      Parameters:
      args - command line arguments (ignored)
    • buildScene

      public static void buildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera)
      Builds the default benchmark scene: the first test's 16x16x16 cube grid (SolidCubesTest, the scene shown on launch) with the camera at its initial position. The benchmark timing loop and camera orbit are NOT part of this method — they stay in the interactive driver. Called by both initializeWindow() and the golden-image harness — must stay deterministic (seeded randomness, no wall-clock).
      Parameters:
      shapes - scene to add shapes to
      lighting - lighting to configure (unused by the default test)
      camera - camera to position
    • onFrame

      public boolean onFrame(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel, int millisecondsSinceLastFrame)
      Specified by:
      onFrame in interface eu.svjatoslav.aukio.e3d.gui.FrameListener
    • keyPressed

      public boolean keyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
      Specified by:
      keyPressed in interface eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
    • keyReleased

      public boolean keyReleased(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
      Specified by:
      keyReleased in interface eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
    • focusLost

      public boolean focusLost(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
      Specified by:
      focusLost in interface eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
    • focusReceived

      public boolean focusReceived(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
      Specified by:
      focusReceived in interface eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler