#include <Math/polar3d.hxx>
#include <Misc/stopwatch.hxx>
#include <Scenery/tileentry.hxx>
+#include <Clouds/cloudobj.hxx>
#include "materialmgr.hxx"
#include "obj.hxx"
}
unsigned short *vindex = new unsigned short [ 4 ];
+ t->free_ptrs.push_back( vindex );
unsigned short *tindex = new unsigned short [ 4 ];
+ t->free_ptrs.push_back( tindex );
for ( i = 0; i < 4; ++i ) {
vindex[i] = i;
tindex[i] = i;
leaf->setState( state );
tile->addKid( leaf );
+ if ( current_options.get_clouds() ) {
+ fgGenCloudTile(path, t, tile);
+ }
return tile;
}
ssgSimpleState *state = NULL;
ssgBranch *tile = new ssgBranch () ;
+
tile -> setName ( (char *)path.c_str() ) ;
// Attempt to open "path.gz" or "path"
// build the ssg entity
unsigned short *vindex =
new unsigned short [ fan_vertices.size() ];
+ t->free_ptrs.push_back( vindex );
+
unsigned short *tindex =
new unsigned short [ fan_tex_coords.size() ];
+ t->free_ptrs.push_back( tindex );
+
for ( i = 0; i < (int)fan_vertices.size(); ++i ) {
vindex[i] = fan_vertices[i];
}
FG_LOG( FG_TERRAIN, FG_DEBUG,
"Loaded " << path << " in "
<< stopwatch.elapsedSeconds() << " seconds" );
-
+
+ // Generate a cloud layer above the tiles
+ if ( current_options.get_clouds() ) {
+ fgGenCloudTile(path, t, tile);
+ }
return tile;
}