#include <Math/polar3d.hxx>
#include <Misc/stopwatch.hxx>
#include <Scenery/tileentry.hxx>
+#include <Clouds/cloudobj.hxx>
#include "materialmgr.hxx"
#include "obj.hxx"
leaf->setState( state );
tile->addKid( leaf );
+ if ( current_options.get_clouds() ) {
+ fgGenCloudTile(path, t, tile);
+ }
return tile;
}
// xglTexCoord2f(pp.x(), pp.y());
// xglVertex3dv(nodes[n3].get_n());
- if ( odd ) {
+ if ( token == "tf" ) {
+ // triangle fan
fragment.add_face(n1, n2, n3);
+ n2 = n3;
} else {
- fragment.add_face(n2, n1, n3);
+ // triangle strip
+ if ( odd ) {
+ fragment.add_face(n1, n2, n3);
+ } else {
+ fragment.add_face(n2, n1, n3);
+ }
+ odd = !odd;
+ n1 = n2;
+ n2 = n3;
}
-
- odd = !odd;
- n1 = n2;
- n2 = n3;
}
// xglEnd();
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;
}