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:
SolidCubesTest- Semi-transparent solid polygon renderingLitSolidCubesTest- Opaque solid polygons with dynamic lightingTexturedCubesTest- Textured polygon renderingWireframeCubesTest- Line renderingStarGridTest- Billboard (glowing point) rendering
-
Constructor Summary
ConstructorsConstructorDescriptionGraphicsBenchmark(eu.svjatoslav.aukio.e3d.examples.benchmark.GraphicsBenchmark.BenchmarkMode mode) Constructs and runs the graphics benchmark. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildScene(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.booleanfocusLost(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) booleanfocusReceived(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) booleankeyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) booleankeyReleased(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) static voidEntry point for the graphics benchmark.booleanonFrame(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel, int millisecondsSinceLastFrame)
-
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
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 bothinitializeWindow()and the golden-image harness — must stay deterministic (seeded randomness, no wall-clock).- Parameters:
shapes- scene to add shapes tolighting- 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:
onFramein interfaceeu.svjatoslav.aukio.e3d.gui.FrameListener
-
keyPressed
- Specified by:
keyPressedin interfaceeu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
-
keyReleased
- Specified by:
keyReleasedin interfaceeu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
-
focusLost
public boolean focusLost(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) - Specified by:
focusLostin interfaceeu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
-
focusReceived
public boolean focusReceived(eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) - Specified by:
focusReceivedin interfaceeu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
-