draw refactoring #1

This commit is contained in:
Sandro Sobczyński
2020-10-29 17:47:28 +01:00
parent 9e00ef3634
commit 5320d7f84d
15 changed files with 267 additions and 78 deletions
+3
View File
@@ -181,12 +181,15 @@ void Renderer::draw(Mesh *t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount)
VECTOR *coordinates = new VECTOR[vertCount];
VECTOR *colors = new VECTOR[vertCount];
if (t_mesh->isObjLoaded)
{
t_mesh->obj->animate();
for (u32 i = 0; i < t_mesh->obj->frames[0].materialsCount; i++)
{
changeTexture(t_mesh, i);
vertCount = t_mesh->getDrawData(i, vertices, normals, coordinates, colors, *renderData.cameraPosition);
vifSender->drawMesh(&renderData, perspective, vertCount, vertices, normals, coordinates, colors, t_mesh, t_bulbs, t_bulbsCount);
}
}
else if (t_mesh->isMd2Loaded)
{
changeTexture(t_mesh, 0);