1
0
Fork 0

Updates to tools to move the class FGArray into the lib area so it could

be used by multiple programs.
Fixed a triangle loading bug in obj.cxx introduced when I added tri-strip
  functionality.
This commit is contained in:
curt 1999-10-19 20:34:58 +00:00
parent 7a1e59ae4b
commit eb81fb7a2d

View file

@ -700,15 +700,21 @@ ssgBranch *fgObjLoad( const string& path, FGTileEntry *t) {
// 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();