diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-03 21:31:54 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-03 21:31:54 +0000 |
commit | 5d9849266e11043deefdd18b4701c7e9c289f37e (patch) | |
tree | d43e7f97613dd6231b9d900758ed89e37b1851d5 /test/perf-terrain.cpp | |
parent | Don't request a specific OpenGL version, just check we get something sufficie... (diff) | |
parent | Implement terrain intersect ray (diff) | |
download | ilt-5d9849266e11043deefdd18b4701c7e9c289f37e.tar.bz2 ilt-5d9849266e11043deefdd18b4701c7e9c289f37e.tar.xz ilt-5d9849266e11043deefdd18b4701c7e9c289f37e.zip |
Psycho-rebased branch terrain on top of main
Diffstat (limited to 'test/perf-terrain.cpp')
-rw-r--r-- | test/perf-terrain.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/perf-terrain.cpp b/test/perf-terrain.cpp new file mode 100644 index 0000000..e998f60 --- /dev/null +++ b/test/perf-terrain.cpp @@ -0,0 +1,18 @@ +#include <benchmark/benchmark.h> +#include <game/terrain2.h> + +namespace { + const TerrainMesh tm {FIXTURESDIR "height/SD19.asc"}; + + void + terrain_findPoint(benchmark::State & state) + { + for (auto _ : state) { + benchmark::DoNotOptimize(tm.findPoint({315555, 495556})); + } + } +} + +BENCHMARK(terrain_findPoint); + +BENCHMARK_MAIN(); |