From 75a90df8bf7f38e746e021c23248e1607931132c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 1 Jul 2011 17:20:53 +0200 Subject: 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. --- terrain.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'terrain.h') 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 #include @@ -29,6 +30,9 @@ class Terrain { }; struct Chunk { + typedef std::pair ObjectPair; + typedef std::list 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(); -- cgit v1.2.3