added texture swapping

This commit is contained in:
Sandro Sobczyński
2020-10-31 22:14:35 +01:00
parent 885e8b4f2b
commit f9dc79caf1
6 changed files with 48 additions and 42 deletions
+4 -1
View File
@@ -94,7 +94,10 @@ void Ari::onInit()
Vector3 testpos = Vector3(0.0F, 10.0F, 0.0F);
test->loadObj("objanim/", "untitled", testpos, 10.0F, 2);
texRepo->addByMesh("objanim/", *test);
// MeshTexture **textures = texRepo->getAll();
MeshTexture **textures = texRepo->getAll();
textures[0]->removeLink(test->id, test->getMaterial(0).getId());
MeshTexture *tex = texRepo->add("objanim/", "water");
tex->addLink(test->id, test->getMaterial(0).getId());
test->playAnimation(0, 1);
test->shouldBeBackfaceCulled = true;
// test->shouldBeFrustumCulled = true;