summaryrefslogtreecommitdiff
path: root/test/test-render.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-09-23 20:11:20 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-09-23 20:11:20 +0100
commit7aeca8c54d218f28ba8d4f0e5be1aec6219dbf54 (patch)
tree6f9c122e0abdb4949a3c102b2245d007969d6091 /test/test-render.cpp
parentDon't create lots of unnecessary tmps (diff)
parentAdjust light colour as sun rises/sets (diff)
downloadilt-7aeca8c54d218f28ba8d4f0e5be1aec6219dbf54.tar.bz2
ilt-7aeca8c54d218f28ba8d4f0e5be1aec6219dbf54.tar.xz
ilt-7aeca8c54d218f28ba8d4f0e5be1aec6219dbf54.zip
Merge branch 'sunpos'
Diffstat (limited to 'test/test-render.cpp')
-rw-r--r--test/test-render.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test-render.cpp b/test/test-render.cpp
index b9a809e..ea53708 100644
--- a/test/test-render.cpp
+++ b/test/test-render.cpp
@@ -1,3 +1,4 @@
+#include "game/environment.h"
#define BOOST_TEST_MODULE test_render
#include "testHelpers.h"
@@ -33,6 +34,7 @@ class TestScene : public SceneProvider {
std::shared_ptr<Plant> plant1;
RailLinks rail;
std::shared_ptr<GeoData> gd = std::make_shared<GeoData>(GeoData::createFlat({0, 0}, {1000000, 1000000}, 1));
+ std::shared_ptr<Environment> env = std::make_shared<Environment>();
Terrain terrain {gd};
Water water {gd};
@@ -69,6 +71,12 @@ public:
}
void
+ environment(const SceneShader &, const SceneRenderer & r) const override
+ {
+ env->render(r, *this);
+ }
+
+ void
shadows(const ShadowMapper & shadowMapper) const override
{
terrain.shadows(shadowMapper);