added texture swapping
This commit is contained in:
1 parent
885e8b4f2b
commit
f9dc79caf1
6 files changed
+48
-42
No files matched your search
@@ -83,6 +83,7 @@ void Renderer::deallocateTextureBuffer()
|
||||
|
||||
void Renderer::changeTexture(Mesh *t_mesh, u32 t_materialId)
|
||||
{
|
||||
|
||||
MeshTexture *tex = textureRepo.getByMesh(t_mesh->id, t_materialId);
|
||||
if (tex != NULL)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,10 @@ TextureRepository::~TextureRepository() {}
|
||||
// Methods
|
||||
// ----
|
||||
|
||||
/** Add unlinked texture.
|
||||
* @param t_subfolder Relative path. Ex.: "textures/"
|
||||
* @param t_name Filename without extension. Ex.: "water"
|
||||
*/
|
||||
MeshTexture *TextureRepository::add(char *t_subfolder, char *t_name)
|
||||
{
|
||||
increaseArray(texturesCount + 1);
|
||||
|
||||
Reference in new issue
Block a user