obj loader refactor

This commit is contained in:
h4570
2022-08-08 21:37:51 +02:00
parent 599d44a491
commit a3e4ee8496
24 changed files with 4517 additions and 464 deletions
@@ -56,10 +56,12 @@ MeshMaterialFrame::MeshMaterialFrame(const MeshBuilder2Data& data,
TYRA_ASSERT(frame->count > 0, "Vertex count must be greater than 0");
TYRA_ASSERT(frame->vertices != nullptr, "Vertex array can't be null");
TYRA_ASSERT(frame->normals != nullptr, "Normal array can't be null");
TYRA_ASSERT(frame->textureCoords != nullptr,
TYRA_ASSERT(!data.normalsEnabled || frame->normals != nullptr,
"Normal array can't be null");
TYRA_ASSERT(!data.textureCoordsEnabled || frame->textureCoords != nullptr,
"Texture coordinate array can't be null");
TYRA_ASSERT(frame->colors != nullptr, "Color array can't be null");
TYRA_ASSERT(!data.lightMapEnabled || frame->colors != nullptr,
"Color array can't be null");
bbox = new BBox(frame->vertices, frame->count);