fix: add setup for number of copied vertex attributes.
Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>pull/521/head
parent
7f3b044b83
commit
8857f26efb
|
@ -631,13 +631,15 @@ void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene
|
||||||
const size_t numItems( countDataArrayListItems( vaList ) );
|
const size_t numItems( countDataArrayListItems( vaList ) );
|
||||||
Value *next( vaList->m_dataList );
|
Value *next( vaList->m_dataList );
|
||||||
if( Position == attribType ) {
|
if( Position == attribType ) {
|
||||||
|
m_currentMesh->mNumVertices = numItems;
|
||||||
m_currentMesh->mVertices = new aiVector3D[ numItems ];
|
m_currentMesh->mVertices = new aiVector3D[ numItems ];
|
||||||
copyVectorArray( numItems, vaList, m_currentMesh->mVertices );
|
copyVectorArray( numItems, vaList, m_currentMesh->mVertices );
|
||||||
} else if( Normal == attribType ) {
|
} else if( Normal == attribType ) {
|
||||||
m_currentMesh->mNormals = new aiVector3D[ numItems ];
|
m_currentMesh->mNormals = new aiVector3D[ numItems ];
|
||||||
copyVectorArray( numItems, vaList, m_currentMesh->mNormals );
|
copyVectorArray( numItems, vaList, m_currentMesh->mNormals );
|
||||||
} else if( TexCoord == attribType ) {
|
} else if( TexCoord == attribType ) {
|
||||||
m_currentMesh->mTextureCoords[0] = new aiVector3D[ numItems ];
|
m_currentMesh->mNumUVComponents[0] = numItems;
|
||||||
|
m_currentMesh->mTextureCoords[ 0 ] = new aiVector3D[ numItems ];
|
||||||
copyVectorArray( numItems, vaList, m_currentMesh->mTextureCoords[0] );
|
copyVectorArray( numItems, vaList, m_currentMesh->mTextureCoords[0] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue