removed mesh_spec

This commit is contained in:
Sandro Sobczyński
2020-10-30 14:50:01 +01:00
parent aa97e471ed
commit 24016ffa7e
11 changed files with 54 additions and 150 deletions
+4 -4
View File
@@ -115,12 +115,12 @@ void Renderer::deallocateTextureBuffer()
void Renderer::changeTexture(Mesh *t_mesh, u8 t_textureIndex)
{
if (t_mesh->spec->textures[t_textureIndex].getId() != lastTextureId)
if (t_mesh->textures[t_textureIndex].getId() != lastTextureId)
{
lastTextureId = t_mesh->spec->textures[t_textureIndex].getId();
lastTextureId = t_mesh->textures[t_textureIndex].getId();
deallocateTextureBuffer();
allocateTextureBuffer(t_mesh->spec->textures[t_textureIndex].getWidth(), t_mesh->spec->textures[t_textureIndex].getHeight());
GifSender::sendTexture(t_mesh->spec->textures[t_textureIndex], &textureBuffer);
allocateTextureBuffer(t_mesh->textures[t_textureIndex].getWidth(), t_mesh->textures[t_textureIndex].getHeight());
GifSender::sendTexture(t_mesh->textures[t_textureIndex], &textureBuffer);
}
}