2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

Skin intermediate outputting for mesh cooker

This commit is contained in:
Jack Andersen
2015-10-21 16:03:26 -10:00
parent 0ad2e69988
commit e20837eabd
9 changed files with 109 additions and 27 deletions

View File

@@ -1228,6 +1228,13 @@ bool WriteCMDL(const HECL::ProjectPath& outPath, const HECL::ProjectPath& inPath
++padIt;
/* Surfaces */
GX::Primitive prim;
if (mesh.outputMode == Mesh::OutputTriangles)
prim = GX::TRIANGLES;
else if (mesh.outputMode == Mesh::OutputTriStrips)
prim = GX::TRIANGLESTRIP;
else
LogDNACommon.report(LogVisor::FatalError, "unrecognized mesh output mode");
for (const Mesh::Surface& surf : mesh.surfaces)
{
const typename MaterialSet::Material::VAFlags& vaFlags =
@@ -1241,7 +1248,7 @@ bool WriteCMDL(const HECL::ProjectPath& outPath, const HECL::ProjectPath& inPath
header.reflectionNormal = surf.reflectionNormal;
header.write(writer);
writer.writeUByte(GX::TRIANGLESTRIP);
writer.writeUByte(prim);
writer.writeUint16Big(surf.verts.size());
for (const Mesh::Surface::Vert& vert : surf.verts)