BUGFIX: Correct handling of not stored texture coordinates
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@125 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
af18307f95
commit
d4d9d016d1
|
@ -366,6 +366,8 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
||||||
|
|
||||||
// Copy all texture coordinates
|
// Copy all texture coordinates
|
||||||
if ( !pModel->m_TextureCoord.empty() )
|
if ( !pModel->m_TextureCoord.empty() )
|
||||||
|
{
|
||||||
|
if ( !pSourceFace->m_pTexturCoords->empty() )
|
||||||
{
|
{
|
||||||
const unsigned int tex = pSourceFace->m_pTexturCoords->at( vertexIndex );
|
const unsigned int tex = pSourceFace->m_pTexturCoords->at( vertexIndex );
|
||||||
ai_assert( tex < pModel->m_TextureCoord.size() );
|
ai_assert( tex < pModel->m_TextureCoord.size() );
|
||||||
|
@ -378,6 +380,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ai_assert( pMesh->mNumVertices > newIndex );
|
ai_assert( pMesh->mNumVertices > newIndex );
|
||||||
pDestFace->mIndices[ vertexIndex ] = newIndex;
|
pDestFace->mIndices[ vertexIndex ] = newIndex;
|
||||||
|
|
Loading…
Reference in New Issue