Forráskód Böngészése

Merge pull request #2825 from bztsrc/master

MSVC workarounds
Kim Kulling 6 éve
szülő
commit
b9ac4c3fda
6 módosított fájl, 304 hozzáadás és 234 törlés
  1. 37 12
      code/M3D/M3DExporter.cpp
  2. 66 38
      code/M3D/M3DImporter.cpp
  3. 3 3
      code/M3D/M3DMaterials.h
  4. 21 21
      code/M3D/M3DWrapper.cpp
  5. 4 0
      code/M3D/M3DWrapper.h
  6. 173 160
      code/M3D/m3d.h

+ 37 - 12
code/M3D/M3DExporter.cpp

@@ -45,7 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define M3D_IMPLEMENTATION
 #define M3D_NOIMPORTER
 #define M3D_EXPORTER
-#define M3D_ASCII
 #ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
 #define M3D_NODUP
 #endif
@@ -65,9 +64,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/Exporter.hpp>
 #include <assimp/IOSystem.hpp>
 
+#include "M3DWrapper.h"
 #include "M3DExporter.h"
 #include "M3DMaterials.h"
-#include "M3DWrapper.h"
 
 // RESOURCES:
 // https://gitlab.com/bztsrc/model3d/blob/master/docs/m3d_format.md
@@ -131,10 +130,32 @@ void addProp(m3dm_t *m, uint8_t type, uint32_t value) {
 	m->prop[i].value.num = value;
 }
 
+// ------------------------------------------------------------------------------------------------
+// convert aiString to identifier safe C string. This is a duplication of _m3d_safestr
+char *SafeStr(aiString str, bool isStrict)
+{
+	char *s = (char *)&str.data;
+	char *d, *ret;
+	int i, len;
+
+	for(len = str.length + 1; *s && (*s == ' ' || *s == '\t'); s++, len--);
+	if(len > 255) len = 255;
+	ret = (char *)M3D_MALLOC(len + 1);
+	if (!ret) {
+		throw DeadlyExportError("memory allocation error");
+	}
+	for(i = 0, d = ret; i < len && *s && *s != '\r' && *s != '\n'; s++, d++, i++) {
+		*d = isStrict && (*s == ' ' || *s == '\t' || *s == '/' || *s == '\\') ? '_' : (*s == '\t' ? ' ' : *s);
+	}
+	for(; d > ret && (*(d-1) == ' ' || *(d-1) == '\t'); d--);
+	*d = 0;
+	return ret;
+}
+
 // ------------------------------------------------------------------------------------------------
 // add a material to the output
 M3D_INDEX addMaterial(const Assimp::M3DWrapper &m3d, const aiMaterial *mat) {
-	unsigned int mi = -1U;
+	unsigned int mi = M3D_NOTDEFINED;
 	aiColor4D c;
 	aiString name;
 	ai_real f;
@@ -150,14 +171,14 @@ M3D_INDEX addMaterial(const Assimp::M3DWrapper &m3d, const aiMaterial *mat) {
 				break;
 			}
 		// if not found, add the material to the output
-		if (mi == -1U) {
+		if (mi == M3D_NOTDEFINED) {
 			unsigned int k;
 			mi = m3d->nummaterial++;
 			m3d->material = (m3dm_t *)M3D_REALLOC(m3d->material, m3d->nummaterial * sizeof(m3dm_t));
 			if (!m3d->material) {
 				throw DeadlyExportError("memory allocation error");
 			}
-			m3d->material[mi].name = _m3d_safestr((char *)&name.data, 0);
+			m3d->material[mi].name = SafeStr(name, true);
 			m3d->material[mi].numprop = 0;
 			m3d->material[mi].prop = NULL;
 			// iterate through the material property table and see what we got
@@ -218,14 +239,14 @@ M3D_INDEX addMaterial(const Assimp::M3DWrapper &m3d, const aiMaterial *mat) {
 							(name.data[j + 1] == 'g' || name.data[j + 1] == 'G'))
 						name.data[j] = 0;
 					// do we have this texture saved already?
-					fn = _m3d_safestr((char *)&name.data, 0);
-					for (j = 0, i = -1U; j < m3d->numtexture; j++)
+					fn = SafeStr(name, true);
+					for (j = 0, i = M3D_NOTDEFINED; j < m3d->numtexture; j++)
 						if (!strcmp(fn, m3d->texture[j].name)) {
 							i = j;
 							free(fn);
 							break;
 						}
-					if (i == -1U) {
+					if (i == M3D_NOTDEFINED) {
 						i = m3d->numtexture++;
 						m3d->texture = (m3dtx_t *)M3D_REALLOC(
 								m3d->texture,
@@ -275,11 +296,15 @@ void ExportSceneM3DA(
 		const ExportProperties *pProperties
 
 ) {
+#ifdef M3D_ASCII
 	// initialize the exporter
 	M3DExporter exporter(pScene, pProperties);
 
 	// perform ascii export
 	exporter.doExport(pFile, pIOSystem, true);
+#else
+	throw DeadlyExportError("Assimp configured without M3D_ASCII support");
+#endif
 }
 
 // ------------------------------------------------------------------------------------------------
@@ -306,7 +331,7 @@ void M3DExporter::doExport(
 	if (!m3d) {
 		throw DeadlyExportError("memory allocation error");
 	}
-	m3d->name = _m3d_safestr((char *)&mScene->mRootNode->mName.data, 2);
+	m3d->name = SafeStr(mScene->mRootNode->mName, false);
 
 	// Create a model from assimp structures
 	aiMatrix4x4 m;
@@ -335,7 +360,7 @@ void M3DExporter::NodeWalk(const M3DWrapper &m3d, const aiNode *pNode, aiMatrix4
 
 	for (unsigned int i = 0; i < pNode->mNumMeshes; i++) {
 		const aiMesh *mesh = mScene->mMeshes[pNode->mMeshes[i]];
-		unsigned int mi = (M3D_INDEX)-1U;
+		unsigned int mi = M3D_NOTDEFINED;
 		if (mScene->mMaterials) {
 			// get the material for this mesh
 			mi = addMaterial(m3d, mScene->mMaterials[mesh->mMaterialIndex]);
@@ -358,7 +383,7 @@ void M3DExporter::NodeWalk(const M3DWrapper &m3d, const aiNode *pNode, aiMatrix4
 			/* set all index to -1 by default */
 			m3d->face[n].vertex[0] = m3d->face[n].vertex[1] = m3d->face[n].vertex[2] =
 					m3d->face[n].normal[0] = m3d->face[n].normal[1] = m3d->face[n].normal[2] =
-							m3d->face[n].texcoord[0] = m3d->face[n].texcoord[1] = m3d->face[n].texcoord[2] = -1U;
+							m3d->face[n].texcoord[0] = m3d->face[n].texcoord[1] = m3d->face[n].texcoord[2] = M3D_UNDEF;
 			m3d->face[n].materialid = mi;
 			for (unsigned int k = 0; k < face->mNumIndices; k++) {
 				// get the vertex's index
@@ -374,7 +399,7 @@ void M3DExporter::NodeWalk(const M3DWrapper &m3d, const aiNode *pNode, aiMatrix4
 				vertex.z = v.z;
 				vertex.w = 1.0;
 				vertex.color = 0;
-				vertex.skinid = -1U;
+				vertex.skinid = M3D_UNDEF;
 				// add color if defined
 				if (mesh->HasVertexColors(0))
 					vertex.color = mkColor(&mesh->mColors[0][l]);

+ 66 - 38
code/M3D/M3DImporter.cpp

@@ -43,7 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
 
 #define M3D_IMPLEMENTATION
-#define M3D_ASCII
 #define M3D_NONORMALS /* leave the post-processing to Assimp */
 #define M3D_NOWEIGHTS
 #define M3D_NOANIMATION
@@ -57,9 +56,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/Importer.hpp>
 #include <memory>
 
+#include "M3DWrapper.h"
 #include "M3DImporter.h"
 #include "M3DMaterials.h"
-#include "M3DWrapper.h"
 
 // RESOURCES:
 // https://gitlab.com/bztsrc/model3d/blob/master/docs/m3d_format.md
@@ -96,7 +95,11 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
+#ifdef M3D_ASCII
 	"m3d a3d"
+#else
+	"m3d"
+#endif
 };
 
 namespace Assimp {
@@ -113,7 +116,11 @@ M3DImporter::M3DImporter() :
 bool M3DImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const {
 	const std::string extension = GetExtension(pFile);
 
-	if (extension == "m3d" || extension == "a3d")
+	if (extension == "m3d"
+#ifdef M3D_ASCII
+		|| extension == "a3d"
+#endif
+		)
 		return true;
 	else if (!extension.length() || checkSig) {
 		if (!pIOHandler) {
@@ -131,7 +138,11 @@ bool M3DImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool c
 		if (4 != pStream->Read(data, 1, 4)) {
 			return false;
 		}
-		return !memcmp(data, "3DMO", 4) /* bin */ || !memcmp(data, "3dmo", 4) /* ASCII */;
+		return !memcmp(data, "3DMO", 4) /* bin */
+#ifdef M3D_ASCII
+			|| !memcmp(data, "3dmo", 4) /* ASCII */
+#endif
+		;
 	}
 	return false;
 }
@@ -159,6 +170,16 @@ void M3DImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSys
 	if (fileSize != pStream->Read(buffer.data(), 1, fileSize)) {
 		throw DeadlyImportError("Failed to read the file " + file + ".");
 	}
+	// extra check for binary format's first 8 bytes. Not done for the ASCII variant
+	if(!memcmp(buffer.data(), "3DMO", 4) && memcmp(buffer.data() + 4, &fileSize, 4)) {
+		throw DeadlyImportError("Bad binary header in file " + file + ".");
+	}
+#ifdef M3D_ASCII
+	// make sure there's a terminator zero character, as input must be ASCIIZ
+	if(!memcmp(buffer.data(), "3dmo", 4)) {
+		buffer.push_back(0);
+	}
+#endif
 
 	// Get the path for external assets
 	std::string folderName("./");
@@ -176,7 +197,6 @@ void M3DImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSys
 	// let the C SDK do the hard work for us
 	M3DWrapper m3d(pIOHandler, buffer);
 
-	
 	if (!m3d) {
 		throw DeadlyImportError("Unable to parse " + file + " as M3D.");
 	}
@@ -193,7 +213,7 @@ void M3DImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSys
 	// now we just have to fill up the Assimp structures in pScene
 	importMaterials(m3d);
     importTextures(m3d);
-	importBones(m3d, -1U, pScene->mRootNode);
+	importBones(m3d, M3D_NOTDEFINED, pScene->mRootNode);
 	importMeshes(m3d);
 	importAnimations(m3d);
 
@@ -306,32 +326,40 @@ void M3DImporter::importTextures(const M3DWrapper &m3d) {
 	for (i = 0; i < m3d->numtexture; i++) {
 		unsigned int j, k;
 		t = &m3d->texture[i];
-		if (!t->w || !t->h || !t->f || !t->d) continue;
 		aiTexture *tx = new aiTexture;
-		strcpy(tx->achFormatHint, formatHint[t->f - 1]);
 		tx->mFilename = aiString(std::string(t->name) + ".png");
-		tx->mWidth = t->w;
-		tx->mHeight = t->h;
-		tx->pcData = new aiTexel[tx->mWidth * tx->mHeight];
-		for (j = k = 0; j < tx->mWidth * tx->mHeight; j++) {
-			switch (t->f) {
-				case 1: tx->pcData[j].g = t->d[k++]; break;
-				case 2:
-					tx->pcData[j].g = t->d[k++];
-					tx->pcData[j].a = t->d[k++];
-					break;
-				case 3:
-					tx->pcData[j].r = t->d[k++];
-					tx->pcData[j].g = t->d[k++];
-					tx->pcData[j].b = t->d[k++];
-					tx->pcData[j].a = 255;
-					break;
-				case 4:
-					tx->pcData[j].r = t->d[k++];
-					tx->pcData[j].g = t->d[k++];
-					tx->pcData[j].b = t->d[k++];
-					tx->pcData[j].a = t->d[k++];
-					break;
+		if (!t->w || !t->h || !t->f || !t->d) {
+			/* without ASSIMP_USE_M3D_READFILECB, we only have the filename, but no texture data ever */
+			tx->mWidth = 0;
+			tx->mHeight = 0;
+			memcpy(tx->achFormatHint, "png\000", 4);
+			tx->pcData = nullptr;
+		} else {
+			/* if we have the texture loaded, set format hint and pcData too */
+			tx->mWidth = t->w;
+			tx->mHeight = t->h;
+			strcpy(tx->achFormatHint, formatHint[t->f - 1]);
+			tx->pcData = new aiTexel[tx->mWidth * tx->mHeight];
+			for (j = k = 0; j < tx->mWidth * tx->mHeight; j++) {
+				switch (t->f) {
+					case 1: tx->pcData[j].g = t->d[k++]; break;
+					case 2:
+						tx->pcData[j].g = t->d[k++];
+						tx->pcData[j].a = t->d[k++];
+						break;
+					case 3:
+						tx->pcData[j].r = t->d[k++];
+						tx->pcData[j].g = t->d[k++];
+						tx->pcData[j].b = t->d[k++];
+						tx->pcData[j].a = 255;
+						break;
+					case 4:
+						tx->pcData[j].r = t->d[k++];
+						tx->pcData[j].g = t->d[k++];
+						tx->pcData[j].b = t->d[k++];
+						tx->pcData[j].a = t->d[k++];
+						break;
+				}
 			}
 		}
 		mScene->mTextures[i] = tx;
@@ -343,7 +371,7 @@ void M3DImporter::importTextures(const M3DWrapper &m3d) {
 // individually. In assimp there're per mesh vertex and UV lists, and they must be
 // indexed simultaneously.
 void M3DImporter::importMeshes(const M3DWrapper &m3d) {
-	unsigned int i, j, k, l, numpoly = 3, lastMat = -2U;
+	unsigned int i, j, k, l, numpoly = 3, lastMat = M3D_INDEXMAX;
 	std::vector<aiMesh *> *meshes = new std::vector<aiMesh *>();
 	std::vector<aiFace> *faces = nullptr;
 	std::vector<aiVector3D> *vertices = nullptr;
@@ -398,20 +426,20 @@ void M3DImporter::importMeshes(const M3DWrapper &m3d) {
 			vertices->push_back(pos);
 			colors->push_back(mkColor(m3d->vertex[l].color));
 			// add a bone to temporary vector
-			if (m3d->vertex[l].skinid != -1U && m3d->vertex[l].skinid != -2U && m3d->skin && m3d->bone) {
+			if (m3d->vertex[l].skinid != M3D_UNDEF && m3d->vertex[l].skinid != M3D_INDEXMAX && m3d->skin && m3d->bone) {
 				// this is complicated, because M3D stores a list of bone id / weight pairs per
 				// vertex but assimp uses lists of local vertex id/weight pairs per local bone list
 				vertexids->push_back(l);
 			}
 			l = m3d->face[i].texcoord[j];
-			if (l != -1U) {
+			if (l != M3D_UNDEF) {
 				uv.x = m3d->tmap[l].u;
 				uv.y = m3d->tmap[l].v;
 				uv.z = 0.0;
 				texcoords->push_back(uv);
 			}
 			l = m3d->face[i].normal[j];
-			if (l != -1U) {
+			if (l != M3D_UNDEF) {
 				norm.x = m3d->vertex[l].x;
 				norm.y = m3d->vertex[l].y;
 				norm.z = m3d->vertex[l].z;
@@ -557,8 +585,8 @@ aiColor4D M3DImporter::mkColor(uint32_t c) {
 void M3DImporter::convertPose(const M3DWrapper &m3d, aiMatrix4x4 *m, unsigned int posid, unsigned int orientid) {
 	ai_assert(m != nullptr);
 	ai_assert(m3d);
-	ai_assert(posid != -1U && posid < m3d->numvertex);
-	ai_assert(orientid != -1U && orientid < m3d->numvertex);
+	ai_assert(posid != M3D_UNDEF && posid < m3d->numvertex);
+	ai_assert(orientid != M3D_UNDEF && orientid < m3d->numvertex);
 	m3dv_t *p = &m3d->vertex[posid];
 	m3dv_t *q = &m3d->vertex[orientid];
 
@@ -692,7 +720,7 @@ void M3DImporter::populateMesh(const M3DWrapper &m3d, aiMesh *pMesh, std::vector
 				// first count how many vertices we have per bone
 				for (i = 0; i < vertexids->size(); i++) {
 					unsigned int s = m3d->vertex[vertexids->at(i)].skinid;
-					if (s != -1U && s != -2U) {
+					if (s != M3D_UNDEF && s != M3D_INDEXMAX) {
 						for (unsigned int k = 0; k < M3D_NUMBONE && m3d->skin[s].weight[k] > 0.0; k++) {
 							aiString name = aiString(std::string(m3d->bone[m3d->skin[s].boneid[k]].name));
 							for (j = 0; j < pMesh->mNumBones; j++) {
@@ -715,7 +743,7 @@ void M3DImporter::populateMesh(const M3DWrapper &m3d, aiMesh *pMesh, std::vector
 				// fill up with data
 				for (i = 0; i < vertexids->size(); i++) {
 					unsigned int s = m3d->vertex[vertexids->at(i)].skinid;
-					if (s != -1U && s != -2U) {
+					if (s != M3D_UNDEF && s != M3D_INDEXMAX) {
 						for (unsigned int k = 0; k < M3D_NUMBONE && m3d->skin[s].weight[k] > 0.0; k++) {
 							aiString name = aiString(std::string(m3d->bone[m3d->skin[s].boneid[k]].name));
 							for (j = 0; j < pMesh->mNumBones; j++) {

+ 3 - 3
code/M3D/M3DMaterials.h

@@ -84,19 +84,19 @@ static const aiMatProp aiProps[] = {
 /* --- Texture Map Properties ---   !!!!! must match m3d_propertytypes !!!!! */
 static const aiMatProp aiTxProps[] = {
     { AI_MATKEY_TEXTURE_DIFFUSE(0) },                        /* m3dp_map_Kd */
-    { AI_MATKEY_TEXTURE_AMBIENT(0) },                        /* m3dp_map_Ka */
+    { AI_MATKEY_TEXTURE(aiTextureType_AMBIENT_OCCLUSION,0) },/* m3dp_map_Ka */
     { AI_MATKEY_TEXTURE_SPECULAR(0) },                       /* m3dp_map_Ks */
     { AI_MATKEY_TEXTURE_SHININESS(0) },                      /* m3dp_map_Ns */
     { AI_MATKEY_TEXTURE_EMISSIVE(0) },                       /* m3dp_map_Ke */
     { NULL, 0, 0 },                                          /* m3dp_map_Tf */
     { AI_MATKEY_TEXTURE_HEIGHT(0) },                         /* m3dp_bump */
     { AI_MATKEY_TEXTURE_OPACITY(0) },                        /* m3dp_map_d */
-    { AI_MATKEY_TEXTURE_REFLECTION(0) },                     /* m3dp_refl */
+    { AI_MATKEY_TEXTURE_NORMALS(0) },                        /* m3dp_map_N */
 
     { AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE_ROUGHNESS,0) },/* m3dp_map_Pr */
     { AI_MATKEY_TEXTURE(aiTextureType_METALNESS,0) },        /* m3dp_map_Pm */
     { NULL, 0, 0 },                                          /* m3dp_map_Ps */
-    { AI_MATKEY_TEXTURE(aiTextureType_AMBIENT_OCCLUSION,0) },/* m3dp_map_Ni */
+    { AI_MATKEY_TEXTURE(aiTextureType_REFLECTION,0) },       /* m3dp_map_Ni */
     { NULL, 0, 0 },                                          /* m3dp_map_Nt */
     { NULL, 0, 0 },
     { NULL, 0, 0 },

+ 21 - 21
code/M3D/M3DWrapper.cpp

@@ -48,24 +48,22 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <assimp/IOStreamBuffer.h>
 #include <assimp/ai_assert.h>
 
-#ifndef AI_M3D_USE_STDMUTEX
-#if (__cplusplus >= 201103L) || (_MSC_VER >= 1900) // C++11 and MSVC 2015 onwards
-#define AI_M3D_USE_STDMUTEX 1
-#else
-#define AI_M3D_USE_STDMUTEX 0
-#endif
-#endif
+#ifdef ASSIMP_USE_M3D_READFILECB
+
+# if (__cplusplus >= 201103L) || !defined(_MSC_VER) || (_MSC_VER >= 1900) // C++11 and MSVC 2015 onwards
+#  define threadlocal thread_local
+# else
+#  if defined(_MSC_VER) && (_MSC_VER >= 1800) // there's an alternative for MSVC 2013
+#   define threadlocal __declspec(thread)
+#  else
+#   define threadlocal
+#  endif
+# endif
 
-#if AI_M3D_USE_STDMUTEX
-#include <mutex>
-std::mutex file_mutex;
-#endif
+extern "C" {
 
 // workaround: the M3D SDK expects a C callback, but we want to use Assimp::IOSystem to implement that
-// This makes it non-rentrant so lock a mutex (requires C++11)
-
-extern "C" {
-void *m3dimporter_pIOHandler;
+threadlocal void *m3dimporter_pIOHandler;
 
 unsigned char *m3dimporter_readfile(char *fn, unsigned int *size) {
 	ai_assert(nullptr != fn);
@@ -75,7 +73,8 @@ unsigned char *m3dimporter_readfile(char *fn, unsigned int *size) {
 			(reinterpret_cast<Assimp::IOSystem *>(m3dimporter_pIOHandler))->Open(file, "rb"));
 	size_t fileSize = 0;
 	unsigned char *data = NULL;
-	// sometimes pStream is nullptr for some reason (should be an empty object returning nothing I guess)
+	// sometimes pStream is nullptr in a single-threaded scenario too for some reason
+	// (should be an empty object returning nothing I guess)
 	if (pStream) {
 		fileSize = pStream->FileSize();
 		// should be allocated with malloc(), because the library will call free() to deallocate
@@ -92,6 +91,7 @@ unsigned char *m3dimporter_readfile(char *fn, unsigned int *size) {
 	return data;
 }
 }
+#endif
 
 namespace Assimp {
 M3DWrapper::M3DWrapper() {
@@ -100,15 +100,15 @@ M3DWrapper::M3DWrapper() {
 }
 
 M3DWrapper::M3DWrapper(IOSystem *pIOHandler, const std::vector<unsigned char> &buffer) {
-#if AI_M3D_USE_STDMUTEX
-	// M3D is NOT thread-safe, so lock the global mutex
-	const std::lock_guard<std::mutex> lock(file_mutex);
-#endif
-	// pass this IOHandler to the C callback
+#ifdef ASSIMP_USE_M3D_READFILECB
+	// pass this IOHandler to the C callback in a thread-local pointer
 	m3dimporter_pIOHandler = pIOHandler;
 	m3d_ = m3d_load(const_cast<unsigned char *>(buffer.data()), m3dimporter_readfile, free, nullptr);
 	// Clear the C callback
 	m3dimporter_pIOHandler = nullptr;
+#else
+	m3d_ = m3d_load(const_cast<unsigned char *>(buffer.data()), nullptr, nullptr, nullptr);
+#endif
 }
 
 M3DWrapper::~M3DWrapper() {

+ 4 - 0
code/M3D/M3DWrapper.h

@@ -52,6 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <vector>
 #include <string>
 
+// Assimp specific M3D configuration. Comment out these defines to remove functionality
+//#define ASSIMP_USE_M3D_READFILECB
+//#define M3D_ASCII
+
 #include "m3d.h"
 
 namespace Assimp {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 173 - 160
code/M3D/m3d.h


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott