Bugfix: Bugfixes fror VS 2010 with CMake ( thanks to Jonathan Klein ).
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1124 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/5/head
parent
007dae433f
commit
16a5bef3ba
2
CREDITS
2
CREDITS
|
@ -26,7 +26,7 @@ Visual Studio 9 support, bugfixes.
|
||||||
B3D-Loader, Assimp testing
|
B3D-Loader, Assimp testing
|
||||||
|
|
||||||
- Jonathan Klein
|
- Jonathan Klein
|
||||||
Ogre Loader
|
Ogre Loader, VC2010 fixes and CMake fixes.
|
||||||
|
|
||||||
- Sebastian Hempel,
|
- Sebastian Hempel,
|
||||||
PyAssimp (first version)
|
PyAssimp (first version)
|
||||||
|
|
|
@ -553,6 +553,13 @@ SET( unzip_SRCS
|
||||||
)
|
)
|
||||||
SOURCE_GROUP( unzip FILES ${unzip_SRCS})
|
SOURCE_GROUP( unzip FILES ${unzip_SRCS})
|
||||||
|
|
||||||
|
|
||||||
|
# VC2010 fixes
|
||||||
|
OPTION( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF )
|
||||||
|
if( VC10_STDINT_FIX )
|
||||||
|
ADD_DEFINITIONS( -D_STDINT )
|
||||||
|
endif( VC10_STDINT_FIX )
|
||||||
|
|
||||||
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
|
ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
|
||||||
|
|
||||||
if ( MSVC80 OR MSVC90 OR MSVC10 )
|
if ( MSVC80 OR MSVC90 OR MSVC10 )
|
||||||
|
|
|
@ -55,7 +55,7 @@ M3Importer::M3Importer() :
|
||||||
m_pHead( NULL ),
|
m_pHead( NULL ),
|
||||||
m_pRefs( NULL )
|
m_pRefs( NULL )
|
||||||
{
|
{
|
||||||
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -263,8 +263,11 @@ void M3Importer::convertToAssimp( const std::string& pFile, aiScene* pScene, DIV
|
||||||
pRootNode->mChildren[ i ] = pCurrentNode;
|
pRootNode->mChildren[ i ] = pCurrentNode;
|
||||||
|
|
||||||
// Loop over the faces of the nodes
|
// Loop over the faces of the nodes
|
||||||
|
// = regions[i].ofsIndices; j < (regions[i].ofsIndices + regions[i].nIndices); j +=3)
|
||||||
|
|
||||||
unsigned int numFaces = ( pRegions[ i ].ofsIndices + pRegions[ i ].nIndices ) - pRegions[ i ].ofsIndices;
|
unsigned int numFaces = ( pRegions[ i ].ofsIndices + pRegions[ i ].nIndices ) - pRegions[ i ].ofsIndices;
|
||||||
aiMesh *pMesh = new aiMesh;
|
aiMesh *pMesh = new aiMesh;
|
||||||
|
pMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
|
||||||
MeshArray.push_back( pMesh );
|
MeshArray.push_back( pMesh );
|
||||||
|
|
||||||
pMesh->mNumFaces = numFaces;
|
pMesh->mNumFaces = numFaces;
|
||||||
|
@ -316,13 +319,14 @@ void M3Importer::createVertexData( aiMesh *pMesh, const std::vector<aiVector3D>
|
||||||
aiFace *pFace = &( pMesh->mFaces[ currentFace ] );
|
aiFace *pFace = &( pMesh->mFaces[ currentFace ] );
|
||||||
for ( unsigned int currentIdx=0; currentIdx<pFace->mNumIndices; currentIdx++ )
|
for ( unsigned int currentIdx=0; currentIdx<pFace->mNumIndices; currentIdx++ )
|
||||||
{
|
{
|
||||||
unsigned int idx = pFace->mIndices[ currentIdx ];
|
const unsigned int idx = pFace->mIndices[ currentIdx ];
|
||||||
if ( vertices.size() > idx )
|
if ( vertices.size() > idx )
|
||||||
{
|
{
|
||||||
pMesh->mVertices[ pos ] = vertices[ idx ];
|
pMesh->mVertices[ pos ] = vertices[ idx ];
|
||||||
pMesh->mNormals[ pos ] = normals[ idx ];
|
pMesh->mNormals[ pos ] = normals[ idx ];
|
||||||
|
|
||||||
pFace->mIndices[ currentIdx ] = pos;
|
pFace->mIndices[ currentIdx ] = pos;
|
||||||
|
pFace->mIndices[ pos ];
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue