summaryrefslogtreecommitdiff
path: root/terrain.h
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-07-01 17:20:53 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-07-02 18:10:14 +0200
commit75a90df8bf7f38e746e021c23248e1607931132c (patch)
treedf2b4f48d5157f775c719192484188a2b0b8a04a /terrain.h
parent90d570822f85f70c31f80789ad6791cebd904468 (diff)
Import and render tree models.
Trees are loaded from the new trees.blend using assimp. Tree objects are then received from the server and rendered on the given terrain locations. Each chunk now holds a list of objects and coordinates, which can be used to easily add other models as well. Also moded the GLSL fog code to its own shader which can be linked in different programs.
Diffstat (limited to 'terrain.h')
-rw-r--r--terrain.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/terrain.h b/terrain.h
index 386f6e3..aff95a4 100644
--- a/terrain.h
+++ b/terrain.h
@@ -3,6 +3,7 @@
#include "vector.h"
#include "terrain_cache.h"
+#include "model.h"
#include <list>
#include <queue>
@@ -29,6 +30,9 @@ class Terrain {
};
struct Chunk {
+ typedef std::pair<models::Model*, Vector3> ObjectPair;
+ typedef std::list<ObjectPair> ObjectList;
+
Terrain *terrain;
Node **nodes;
float x, y;
@@ -42,6 +46,7 @@ class Terrain {
unsigned int vbo_object;
unsigned int node_count;
unsigned int vertices;
+ ObjectList objects;
Chunk(Terrain *tree, float x, float y);
~Chunk();