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,16 +700,22 @@ ssgBranch *fgObjLoad( const string& path, FGTileEntry *t) {
// xglTexCoord2f(pp.x(), pp.y()); // xglTexCoord2f(pp.x(), pp.y());
// xglVertex3dv(nodes[n3].get_n()); // xglVertex3dv(nodes[n3].get_n());
if ( token == "tf" ) {
// triangle fan
fragment.add_face(n1, n2, n3);
n2 = n3;
} else {
// triangle strip
if ( odd ) { if ( odd ) {
fragment.add_face(n1, n2, n3); fragment.add_face(n1, n2, n3);
} else { } else {
fragment.add_face(n2, n1, n3); fragment.add_face(n2, n1, n3);
} }
odd = !odd; odd = !odd;
n1 = n2; n1 = n2;
n2 = n3; n2 = n3;
} }
}
// xglEnd(); // xglEnd();