summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-09-20 20:17:32 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-09-20 20:17:44 +0100
commit489fa7f930689dc9ff271138e613a8d68d88ee45 (patch)
treef4f4b3c8ca55e08f797dc04e0ba3d745133fba13 /test
parentUpdate getSunPos to use a standard time_t (diff)
downloadilt-489fa7f930689dc9ff271138e613a8d68d88ee45.tar.bz2
ilt-489fa7f930689dc9ff271138e613a8d68d88ee45.tar.xz
ilt-489fa7f930689dc9ff271138e613a8d68d88ee45.zip
Add basic environment object
Will hold world time/date, weather, location etc
Diffstat (limited to 'test')
-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);