[Plib-cvs] plib/src/ssg ssgLoaderWriterStuff.cxx,1.29,1.30
Brought to you by:
sjbaker
From: Wolfram K. <wol...@us...> - 2004-10-04 18:21:56
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26960 Modified Files: ssgLoaderWriterStuff.cxx Log Message: Add vertex texture coords only when adding a vertex Index: ssgLoaderWriterStuff.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoaderWriterStuff.cxx,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ssgLoaderWriterStuff.cxx 15 Sep 2002 01:29:12 -0000 1.29 +++ ssgLoaderWriterStuff.cxx 4 Oct 2004 18:20:25 -0000 1.30 @@ -170,7 +170,7 @@ } } for (i = 0; i < l_node->getNumTriangles(); i++) { - short v1, v2, v3; + WKSHORT v1, v2, v3; l_node->getTriangle(i, &v1, &v2, &v3); indices->add( vert_low + v1 ); indices->add( vert_low + v2 ); @@ -528,7 +528,7 @@ sgVec3 v1, v2, n; [...67 lines suppressed...] newVertexIndex = newVertices->getNum(); newVertices->add( theVertices->get( oldVertexIndex ) ); oldVertexIndexToNewVertexIndex->set( newVertexIndex, oldVertexIndex ); - } + if ( perVertexTextureCoordinates2 != NULL ) newPerVertexTextureCoordinates2 -> add( perVertexTextureCoordinates2->get( oldVertexIndex ) ); + } // From here on the indexes in thisFace are only valid in relation to // newVertices and newtextureCoordinatePerVertex. Since this face will not be used for any // further material, this doesn't lead to problems. @@ -810,7 +810,7 @@ current_options, curr_branch_); } } - } + } } int ssgLoaderWriterMesh::checkMe() |