moved aabb calcs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2020, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "../include/modules/texture_repository.hpp"
|
||||
#include "../include/utils/debug.hpp"
|
||||
|
||||
// ----
|
||||
// Constructors/Destructors
|
||||
// ----
|
||||
|
||||
TextureRepository::TextureRepository()
|
||||
{
|
||||
PRINT_LOG("Initializing texture repository");
|
||||
|
||||
PRINT_LOG("Texture repository initialized!");
|
||||
}
|
||||
|
||||
TextureRepository::~TextureRepository() {}
|
||||
|
||||
// ----
|
||||
// Methods
|
||||
// ----
|
||||
Reference in New Issue
Block a user