From 77cec96d740106a317c4327bd20f0acb2b0c6254 Mon Sep 17 00:00:00 2001 From: Madrich Date: Sat, 7 Jun 2014 21:17:31 +0200 Subject: [PATCH] Fix collada --- code/ColladaExporter.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 6a016e331..f753124e3 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -354,7 +354,8 @@ void ColladaExporter::WriteTextureColorEntry( const Surface& pSurface, const std if( pSurface.texture.empty() ) { mOutput << startstr << "" << pSurface.color.r << " " << pSurface.color.g << " " << pSurface.color.b << " " << pSurface.color.a << "" << endstr; - } else + } + else { mOutput << startstr << "" << endstr; } @@ -673,8 +674,17 @@ void ColladaExporter::WriteGeometry( size_t pIndex) { const aiFace& face = mesh->mFaces[a]; if (face.mNumIndices != 3) continue; + // write vertix indices for( size_t b = 0; b < face.mNumIndices; ++b ) + { mOutput << face.mIndices[b] << " "; + } + // write normal indices + for( size_t b = 0; b < face.mNumIndices; ++b ) + { + mOutput << face.mIndices[b] << " "; + } + } mOutput << "

" << endstr; PopTag();