moved aabb calcs

This commit is contained in:
Sandro Sobczyński
2020-10-31 10:04:58 +01:00
parent 24016ffa7e
commit ebf2a9ac24
9 changed files with 173 additions and 53 deletions
+4 -4
View File
@@ -115,12 +115,12 @@ void Renderer::deallocateTextureBuffer()
void Renderer::changeTexture(Mesh *t_mesh, u8 t_textureIndex)
{
if (t_mesh->textures[t_textureIndex].getId() != lastTextureId)
if (t_mesh->textures[t_textureIndex]->getId() != lastTextureId)
{
lastTextureId = t_mesh->textures[t_textureIndex].getId();
lastTextureId = t_mesh->textures[t_textureIndex]->getId();
deallocateTextureBuffer();
allocateTextureBuffer(t_mesh->textures[t_textureIndex].getWidth(), t_mesh->textures[t_textureIndex].getHeight());
GifSender::sendTexture(t_mesh->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);
}
}