From: Svjatoslav Agejenko Date: Mon, 16 Mar 2026 20:53:58 +0000 (+0200) Subject: feat(benchmark): add lit solid cubes test X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=e13431be84c2633eee47d951eab5b7b99ea8743d;p=sixth-3d-demos.git feat(benchmark): add lit solid cubes test Adds a benchmark test for opaque solid cubes with dynamic lighting. Three orbiting light sources illuminate a 16x16x16 cube grid to test shaded polygon rasterization performance. - Add LitSolidCubesTest with animated orbiting lights - Add setViewPanel to BenchmarkTest interface for animation support - Update benchmark results with new test data --- diff --git a/doc/index.org b/doc/index.org index 0cf513a..c53fbf7 100644 --- a/doc/index.org +++ b/doc/index.org @@ -235,6 +235,7 @@ Cores: 24 Test Avg FPS -------------------------------------------------------------------------------- Solid Cubes 49.65 +Lit Solid Cubes 41.40 Textured Cubes 32.80 Wireframe Cubes 42.84 Star Grid 304.59 diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/BenchmarkTest.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/BenchmarkTest.java index dec1514..14ab974 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/BenchmarkTest.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/BenchmarkTest.java @@ -5,6 +5,7 @@ package eu.svjatoslav.sixth.e3d.examples.benchmark; +import eu.svjatoslav.sixth.e3d.gui.ViewPanel; import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; /** @@ -30,4 +31,12 @@ public interface BenchmarkTest { * @param shapes the shape collection to clean up */ void teardown(ShapeCollection shapes); + + /** + * Called after setup to provide the view panel for tests that need animation. + * Default implementation does nothing. + * @param viewPanel the view panel + */ + default void setViewPanel(ViewPanel viewPanel) { + } } \ No newline at end of file diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/GraphicsBenchmark.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/GraphicsBenchmark.java index 1f9728a..cc20649 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/GraphicsBenchmark.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/benchmark/GraphicsBenchmark.java @@ -34,7 +34,8 @@ import java.util.List; * *

Available tests:

*