Set mNumUVComponents to 0 when deleting texture coordinate sets
parent
938c02a358
commit
cc4531459f
|
@ -360,10 +360,13 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
|
||||||
// process texture coordinates
|
// process texture coordinates
|
||||||
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i];++i) {
|
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i];++i) {
|
||||||
if (ProcessArray(pMesh->mTextureCoords[i],pMesh->mNumVertices,"uvcoords",dirtyMask)) {
|
if (ProcessArray(pMesh->mTextureCoords[i],pMesh->mNumVertices,"uvcoords",dirtyMask)) {
|
||||||
|
pMesh->mNumUVComponents[i] = 0;
|
||||||
|
|
||||||
// delete all subsequent texture coordinate sets.
|
// delete all subsequent texture coordinate sets.
|
||||||
for (unsigned int a = i + 1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) {
|
for (unsigned int a = i + 1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) {
|
||||||
delete[] pMesh->mTextureCoords[a]; pMesh->mTextureCoords[a] = NULL;
|
delete[] pMesh->mTextureCoords[a];
|
||||||
|
pMesh->mTextureCoords[a] = NULL;
|
||||||
|
pMesh->mNumUVComponents[a] = 0;
|
||||||
}
|
}
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue