diff --git a/src/QD3D/3DMFParser.cpp b/src/QD3D/3DMFParser.cpp index 0908d38..f366ebd 100644 --- a/src/QD3D/3DMFParser.cpp +++ b/src/QD3D/3DMFParser.cpp @@ -416,6 +416,7 @@ void Q3MetaFileParser::Parse_atar(uint32_t chunkSize) currentMesh->vertexColors[i].b = f.Read(); currentMesh->vertexColors[i].a = 1.0f; } + currentMesh->hasVertexColors = true; } else if (isTriangleAttribute && attributeType == kQ3AttributeTypeNormal) // face normals { diff --git a/src/QD3D/QD3D.cpp b/src/QD3D/QD3D.cpp index 3780ead..8304db8 100644 --- a/src/QD3D/QD3D.cpp +++ b/src/QD3D/QD3D.cpp @@ -174,6 +174,11 @@ TQ3TriMeshData* Q3TriMeshData_New(int numTriangles, int numPoints, bool perVerte { for (int i = 0; i < numPoints; i++) mesh->vertexColors[i] = {1, 1, 1, 1}; + mesh->hasVertexColors = true; + } + else + { + mesh->hasVertexColors = false; } return mesh;