]> git.mxchange.org Git - flightgear.git/blobdiff - src/Objects/apt_signs.cxx
Replaced some debugging structure David inadvertantly removed.
[flightgear.git] / src / Objects / apt_signs.cxx
index 51b2dfc72f66d230c0f5e718f74c114e7222c82b..ee377b64e814a802ca903d6aa5fa045d5c6caa31 100644 (file)
@@ -21,6 +21,7 @@
 // $Id$
 
 
+#include <simgear/debug/logstream.hxx>
 #include <simgear/math/sg_types.hxx>
 
 #include "apt_signs.hxx"
@@ -55,7 +56,8 @@ ssgBranch *gen_taxi_sign( const string path, const string content ) {
            material += c;
            material += ".rgb";
        } else {
-           cout << "Unknown taxi sign code = '" << item << "' !!!!" << endl;
+           SG_LOG( SG_TERRAIN, SG_ALERT,
+                    "Unknown taxi sign code = '" << item << "' !!!!" );
            return NULL;
        }
 
@@ -63,6 +65,7 @@ ssgBranch *gen_taxi_sign( const string path, const string content ) {
        point_list normals; normals.clear();
        point_list texcoords; texcoords.clear();
        int_list vertex_index; vertex_index.clear();
+       int_list normal_index; normal_index.clear();
        int_list tex_index; tex_index.clear();
 
        nodes.push_back( Point3D( -offset + i, 0, 0.25 ) );
@@ -70,9 +73,6 @@ ssgBranch *gen_taxi_sign( const string path, const string content ) {
        nodes.push_back( Point3D( -offset + i, 0, 1.25 ) );
        nodes.push_back( Point3D( -offset + i + 1, 0, 1.25 ) );
 
-       normals.push_back( Point3D( 0, -1, 0 ) );
-       normals.push_back( Point3D( 0, -1, 0 ) );
-       normals.push_back( Point3D( 0, -1, 0 ) );
        normals.push_back( Point3D( 0, -1, 0 ) );
 
        texcoords.push_back( Point3D( 0, 0, 0 ) );
@@ -85,6 +85,11 @@ ssgBranch *gen_taxi_sign( const string path, const string content ) {
        vertex_index.push_back( 2 );
        vertex_index.push_back( 3 );
 
+       normal_index.push_back( 0 );
+       normal_index.push_back( 0 );
+       normal_index.push_back( 0 );
+       normal_index.push_back( 0 );
+
        tex_index.push_back( 0 );
        tex_index.push_back( 1 );
        tex_index.push_back( 2 );
@@ -92,7 +97,7 @@ ssgBranch *gen_taxi_sign( const string path, const string content ) {
 
        ssgLeaf *leaf = gen_leaf( path, GL_TRIANGLE_STRIP, material,
                                  nodes, normals, texcoords,
-                                 vertex_index, tex_index,
+                                 vertex_index, normal_index, tex_index,
                                  false, NULL );
 
        object->addKid( leaf );
@@ -117,6 +122,7 @@ ssgBranch *gen_runway_sign( const string path, const string name ) {
     point_list normals; normals.clear();
     point_list texcoords; texcoords.clear();
     int_list vertex_index; vertex_index.clear();
+    int_list normal_index; normal_index.clear();
     int_list tex_index; tex_index.clear();
 
     nodes.push_back( Point3D( -width, 0, 0.25 ) );
@@ -124,9 +130,6 @@ ssgBranch *gen_runway_sign( const string path, const string name ) {
     nodes.push_back( Point3D( -width, 0, 1.25 ) );
     nodes.push_back( Point3D( width + 1, 0, 1.25 ) );
 
-    normals.push_back( Point3D( 0, -1, 0 ) );
-    normals.push_back( Point3D( 0, -1, 0 ) );
-    normals.push_back( Point3D( 0, -1, 0 ) );
     normals.push_back( Point3D( 0, -1, 0 ) );
 
     texcoords.push_back( Point3D( 0, 0, 0 ) );
@@ -139,6 +142,11 @@ ssgBranch *gen_runway_sign( const string path, const string name ) {
     vertex_index.push_back( 2 );
     vertex_index.push_back( 3 );
 
+    normal_index.push_back( 0 );
+    normal_index.push_back( 0 );
+    normal_index.push_back( 0 );
+    normal_index.push_back( 0 );
+
     tex_index.push_back( 0 );
     tex_index.push_back( 1 );
     tex_index.push_back( 2 );
@@ -146,7 +154,7 @@ ssgBranch *gen_runway_sign( const string path, const string name ) {
 
     ssgLeaf *leaf = gen_leaf( path, GL_TRIANGLE_STRIP, material,
                              nodes, normals, texcoords,
-                             vertex_index, tex_index,
+                             vertex_index, normal_index, tex_index,
                              false, NULL );
 
     object->addKid( leaf );