blob: fd2bfd4b6b4227a813d46688d253ac3014f4c6ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "environment.h"
#include <chronology.h>
#include <gfx/gl/sceneRenderer.h>
Environment::Environment() : worldTime {"2024-01-01T12:00:00"_time_t} { }
void
Environment::tick(TickDuration)
{
worldTime += 1;
}
void
Environment::render(const SceneRenderer & renderer, const SceneProvider & scene) const
{
renderer.setAmbientLight({0.5F, 0.5F, 0.5F});
renderer.setDirectionalLight({0.6F, 0.6F, 0.6F}, {-1, 1, -1}, scene);
}
|