summaryrefslogtreecommitdiffstats
path: root/3rdparty
diff options
context:
space:
mode:
authorDanny Pope <daniel.pope@nokia.com>2011-06-03 17:01:12 +1000
committerDanny Pope <daniel.pope@nokia.com>2011-06-03 17:01:12 +1000
commit1842ab29e79de409052a98ace89d2e60fa16ae9f (patch)
tree08f72a5825f9942534534a3059fb864fc7649031 /3rdparty
parent14dada4793afdb881a1667d71b324819bf501411 (diff)
QTBUG-19426 Models in assimp fixed for Symbian...
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/assimp/code/JoinVerticesProcess.cpp17
-rw-r--r--3rdparty/assimp/include/aiDefines.h7
2 files changed, 18 insertions, 6 deletions
diff --git a/3rdparty/assimp/code/JoinVerticesProcess.cpp b/3rdparty/assimp/code/JoinVerticesProcess.cpp
index b98927181..9ecd38920 100644
--- a/3rdparty/assimp/code/JoinVerticesProcess.cpp
+++ b/3rdparty/assimp/code/JoinVerticesProcess.cpp
@@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* for all imported meshes
*/
+#include <QtCore/qdebug.h>
#include "AssimpPCH.h"
#ifndef ASSIMP_BUILD_NO_JOINVERTICES_PROCESS
@@ -56,7 +57,7 @@ using namespace Assimp;
// Constructor to be privately used by Importer
JoinVerticesProcess::JoinVerticesProcess()
{
- // nothing to do here
+ // nothing to do here
}
// ------------------------------------------------------------------------------------------------
@@ -85,7 +86,6 @@ void JoinVerticesProcess::Execute( aiScene* pScene)
iNumOldVertices += pScene->mMeshes[a]->mNumVertices;
}
}
-
// execute the step
int iNumVertices = 0;
for ( unsigned int a = 0; a < pScene->mNumMeshes; a++)
@@ -125,7 +125,17 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// We'll never have more vertices afterwards.
std::vector<Vertex> uniqueVertices;
- uniqueVertices.reserve( pMesh->mNumVertices);
+
+#ifndef __GCCE__
+#ifndef __arm__
+ try {
+ uniqueVertices.reserve( pMesh->mNumVertices);
+ } catch (...) {
+ qWarning("Unable to reserve vertex space");
+ return 0;
+ }
+#endif
+#endif
// For each vertex the index of the vertex it was replaced by.
// Since the maximal number of vertices is 2^31-1, the most significand bit can be used to mark
@@ -188,7 +198,6 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// check all unique vertices close to the position if this vertex is already present among them
for ( unsigned int b = 0; b < verticesFound.size(); b++) {
-
const unsigned int vidx = verticesFound[b];
const unsigned int uidx = replaceIndex[ vidx];
if ( uidx & 0x80000000)
diff --git a/3rdparty/assimp/include/aiDefines.h b/3rdparty/assimp/include/aiDefines.h
index 4d7aec183..b6c5ff9c7 100644
--- a/3rdparty/assimp/include/aiDefines.h
+++ b/3rdparty/assimp/include/aiDefines.h
@@ -245,9 +245,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# else
# error unknown architecture
# endif
-#else
+#elif defined (__GCCE__)
+#define ASSIMP_BUILD_ARM_32BIT_ARCHITECTURE
+#elif defined (__arm__)
#define ASSIMP_BUILD_ARM_32BIT_ARCHITECTURE
-//# error unknown compiler
+#else //assume
+# error unknown compiler
#endif
//////////////////////////////////////////////////////////////////////////