diff --git a/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.cpp b/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.cpp index e9a53b7fe..c5641d7a8 100644 --- a/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.cpp +++ b/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.cpp @@ -73,19 +73,37 @@ namespace STORAGE { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// +void CGeomTriIndex::serial(NLMISC::IStream &stream) +{ + stream.serial(a); + stream.serial(b); + stream.serial(c); +} + +std::string CGeomTriIndex::toString() const +{ + std::stringstream ss; + ss << a << " " << b << " " << c; + return ss.str(); +} + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + void CGeomTriIndexInfo::serial(NLMISC::IStream &stream) { stream.serial(a); stream.serial(b); stream.serial(c); - stream.serial(i1); - stream.serial(i2); + stream.serial(alwaysOne); + stream.serial(smoothingGroups); } std::string CGeomTriIndexInfo::toString() const { std::stringstream ss; - ss << a << ", " << b << ", " << c << ", " << i1 << ", " << i2; + ss << a << " " << b << " " << c << ", " << alwaysOne << " " << smoothingGroups; return ss.str(); } @@ -137,21 +155,23 @@ IStorageObject *CGeomBuffers::createChunkById(uint16 id, bool container) { switch (id) { - case PMBS_GEOM_BUFFERS_TRI_B_VERTEX_CHUNK_ID: - case PMBS_GEOM_BUFFERS_TRI_C_VERTEX_CHUNK_ID: - case PBMS_GEOM_BUFFERS_POLY_A_VERTEX_CHUNK_ID: - nlassert(!container); - return new CStorageArray(); + //case PBMS_GEOM_BUFFERS_POLY_A_VERTEX_CHUNK_ID: + // nlassert(!container); + // return new CStorageArray(); + //case PBMS_GEOM_BUFFERS_POLY_A_INDEX_A_CHUNK_ID: + //case PBMS_GEOM_BUFFERS_POLY_A_INDEX_B_CHUNK_ID: + // nlassert(!container); + // return new CStorageArray(); case PMBS_GEOM_BUFFERS_TRI_B_INDEX_CHUNK_ID: case PMBS_GEOM_BUFFERS_TRI_C_INDEX_CHUNK_ID: - case PBMS_GEOM_BUFFERS_POLY_A_INDEX_A_CHUNK_ID: - case PBMS_GEOM_BUFFERS_POLY_A_INDEX_B_CHUNK_ID: nlassert(!container); - return new CStorageArray(); + return new CStorageArray(); // nb: parse should check if the sizes match with tri_a size (which is the master index buffer) case PMBS_GEOM_BUFFERS_TRI_A_INDEX_CHUNK_ID: nlassert(!container); return new CStorageArraySizePre(); case PMBS_GEOM_BUFFERS_TRI_A_VERTEX_CHUNK_ID: + case PMBS_GEOM_BUFFERS_TRI_B_VERTEX_CHUNK_ID: + case PMBS_GEOM_BUFFERS_TRI_C_VERTEX_CHUNK_ID: nlassert(!container); return new CStorageArraySizePre(); } diff --git a/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.h b/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.h index eefda308d..3b1c3e8ab 100644 --- a/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.h +++ b/code/nel/tools/pipeline/max/builtin/storage/geom_buffers.h @@ -41,13 +41,22 @@ namespace MAX { namespace BUILTIN { namespace STORAGE { +struct CGeomTriIndex +{ + uint32 a; + uint32 b; + uint32 c; + void serial(NLMISC::IStream &stream); + std::string toString() const; +}; + struct CGeomTriIndexInfo { uint32 a; uint32 b; uint32 c; - uint32 i1; - uint32 i2; + uint32 alwaysOne; + uint32 smoothingGroups; void serial(NLMISC::IStream &stream); std::string toString() const; };