Update of /cvsroot/plib/plib/src/ssg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30483
Modified Files:
ssgLoadX.cxx ssgLoaderWriterStuff.cxx
Log Message:
Jan Reucker's DirectX loader patch in an e-mail to plib-devel on 11/21/05, 1:06 PM.
Index: ssgLoadX.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadX.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ssgLoadX.cxx 2 Dec 2004 21:26:39 -0000 1.23
+++ ssgLoadX.cxx 5 Jan 2006 20:54:15 -0000 1.24
@@ -475,11 +475,16 @@
}
}
while(TRUE)
- { char *nextToken =parser.getNextToken(0);
+ {
+ char *nextToken =parser.getNextToken(0);
if (0==strcmp("}", nextToken))
{ if ( nMaterialsRead < nMaterials )
parser.error("Too few Materials!\n");
//else parser.error("Success! MeshMaterialList!\n");
+ for (int i = 0; i < globalMaterialList->getNum(); i++)
+ {
+ currentMesh.addMaterial(globalMaterialList->get(i));
+ }
return TRUE; // Mesh is finished. success
}
if(ulStrEqual ("{", nextToken) )
Index: ssgLoaderWriterStuff.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgLoaderWriterStuff.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- ssgLoaderWriterStuff.cxx 6 Oct 2004 14:25:11 -0000 1.31
+++ ssgLoaderWriterStuff.cxx 5 Jan 2006 20:54:15 -0000 1.32
@@ -657,7 +657,9 @@
if ( colours == NULL )
{
colours = new ssgColourArray ( 1 ) ;
- colours -> add ( currentDiffuse ) ;
+ sgVec4 currentDiffuseColour;
+ sgCopyVec4(currentDiffuseColour, currentState->getMaterial(GL_DIFFUSE));
+ colours -> add ( currentDiffuseColour ) ;
}
}
ssgVtxArray* leaf = new ssgVtxArray ( GL_TRIANGLES, theVertices, normalList, theTextureCoordinates2, colours, indexList ) ;
|