mirror of
https://github.com/jorio/Pomme.git
synced 2025-01-14 04:30:01 +00:00
QD3D: Set hasVertexColors flag in TQ3TriMeshData
This commit is contained in:
parent
cf21b9a7a8
commit
fd0b31c915
@ -416,6 +416,7 @@ void Q3MetaFileParser::Parse_atar(uint32_t chunkSize)
|
||||
currentMesh->vertexColors[i].b = f.Read<float>();
|
||||
currentMesh->vertexColors[i].a = 1.0f;
|
||||
}
|
||||
currentMesh->hasVertexColors = true;
|
||||
}
|
||||
else if (isTriangleAttribute && attributeType == kQ3AttributeTypeNormal) // face normals
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user