summaryrefslogtreecommitdiff
path: root/application/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-25 01:11:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-01-25 01:11:09 +0000
commit535be42da6a32cae03fd0422b44862fdf9638c5b (patch)
tree00802162bfd3c6aa7aa9286035af3d9a1a1e0bbe /application/main.cpp
parentSimplify vertex interface (diff)
downloadilt-535be42da6a32cae03fd0422b44862fdf9638c5b.tar.bz2
ilt-535be42da6a32cae03fd0422b44862fdf9638c5b.tar.xz
ilt-535be42da6a32cae03fd0422b44862fdf9638c5b.zip
Generate some basic flat terrain
Diffstat (limited to 'application/main.cpp')
-rw-r--r--application/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/main.cpp b/application/main.cpp
index f510eca..f7861c8 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -1,3 +1,4 @@
+#include "game/terrain.h"
#include "gfx/window.h"
#include <SDL2/SDL.h>
#include <chrono>
@@ -21,7 +22,7 @@ static const int DISPLAY_HEIGHT = 600;
class Monkey : public WorldObject, public Physical {
public:
- Monkey() : Physical {{}, "res/monkey3.obj", "res/bricks.jpg"} { }
+ Monkey() : Physical {{0.0, 0.5, 1.0}, "res/monkey3.obj", "res/bricks.jpg"} { }
void
tick(TickDuration elapsed) override
@@ -66,6 +67,7 @@ public:
World world;
world.create<Monkey>();
+ world.create<Terrain>();
Shader shader;
Camera camera({-5.0F, 2.0F, -5.0F}, 70.0F, (float)DISPLAY_WIDTH / (float)DISPLAY_HEIGHT, 0.1F, 100.0F);