Commit cf404ad2 authored by hybrid's avatar hybrid

Add default material-face-indices for very compact .x files.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2061 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4b01f204
......@@ -139,6 +139,13 @@ bool CXMeshFileLoader::load(io::IReadFile* file)
}
}
if (!mesh->FaceMaterialIndices.size())
{
mesh->FaceMaterialIndices.set_used(mesh->Indices.size() / 3);
for (i=0; i<mesh->FaceMaterialIndices.size(); ++i)
mesh->FaceMaterialIndices[i]=0;
}
if (!mesh->HasVertexColors)
{
for (u32 j=0;j<mesh->FaceMaterialIndices.size();++j)
......@@ -479,9 +486,6 @@ bool CXMeshFileLoader::parseDataObject()
// some meshes have no frames at all
//CurFrame = AnimatedMesh->createJoint(0);
//CurFrame->Meshes.push_back(SXMesh());
//return parseDataObjectMesh(CurFrame->Meshes.getLast());
SXMesh *mesh=new SXMesh;
//mesh->Buffer=AnimatedMesh->createBuffer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment