]> git.mxchange.org Git - simgear.git/commitdiff
add minimalistic backside to signs as a temporary solution
authormfranz <mfranz>
Tue, 11 Apr 2006 21:32:15 +0000 (21:32 +0000)
committermfranz <mfranz>
Tue, 11 Apr 2006 21:32:15 +0000 (21:32 +0000)
simgear/scene/tgdb/apt_signs.cxx

index ef2e384d17dec15c83c5f9ddf1bc4fe8f25c1994..e4d9fb571862c4ec2a25f8cf7c3caaf81d7a3506 100644 (file)
@@ -308,6 +308,23 @@ ssgBranch *sgMakeTaxiSign( SGMaterialLib *matlib,
         delete element;
     }
 
+
+    // minimalistic backside
+    ssgVertexArray *vl = new ssgVertexArray(4);
+    vl->add(hpos,               0, dist);
+    vl->add(hpos - total_width, 0, dist);
+    vl->add(hpos,               0, dist + sign_height);
+    vl->add(hpos - total_width, 0, dist + sign_height);
+
+    ssgNormalArray *nl = new ssgNormalArray(1);
+    nl->add(0, 1, 0);
+
+    ssgLeaf *leaf = new ssgVtxTable(GL_TRIANGLE_STRIP, vl, nl, 0, 0);
+    SGMaterial *mat = matlib->find("BlackSign");
+    if (mat)
+        leaf->setState(mat->get_state());
+    object->addKid(leaf);
+
     return object;
 }