Removed erroneous comment from View. Do not treat it a fatal error in OgreImporter if index optimization can't be done.

This commit is contained in:
Lasse Öörni 2014-03-08 17:03:58 +02:00
Родитель 340e09c454
Коммит 1941c508b4
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -853,8 +853,6 @@ void View::GetBatches()
Drawable* drawable = *k;
if (!drawable->IsInView(frame_, true))
{
// May be called from multiple threads, so don't manipulate the Drawable's viewCameras set,
// just update the frame number
drawable->MarkInView(frame_.frameNumber_, 0);
shadowGeometries_.Push(drawable);
}

Просмотреть файл

@ -1057,15 +1057,18 @@ void OptimizeIndices(ModelSubGeometryLodLevel* subGeom, ModelVertexBuffer* vb, M
PODVector<Triangle> oldTriangles;
PODVector<Triangle> newTriangles;
if (subGeom->indexCount_ % 3)
{
PrintLine("Index count is not divisible by 3, skipping index optimization");
return;
}
for (unsigned i = 0; i < vb->vertices_.Size(); ++i)
{
vb->vertices_[i].useCount_ = 0;
vb->vertices_[i].cachePosition_ = -1;
}
if (subGeom->indexCount_ % 3)
ErrorExit("Index count is not divisible by 3");
for (unsigned i = subGeom->indexStart_; i < subGeom->indexStart_ + subGeom->indexCount_; i += 3)
{
Triangle triangle;
@ -1105,7 +1108,10 @@ void OptimizeIndices(ModelSubGeometryLodLevel* subGeom, ModelVertexBuffer* vb, M
}
if (bestTriangle == M_MAX_UNSIGNED)
ErrorExit("Could not find next triangle");
{
PrintLine("Could not find next triangle, aborting index optimization");
return;
}
// Add the best triangle
Triangle triangleCopy = oldTriangles[bestTriangle];