demo fixes

This commit is contained in:
h4570
2022-08-24 19:50:11 +02:00
parent a21bcee671
commit 0fd2478049
5 changed files with 14 additions and 19 deletions
+2 -3
View File
@@ -23,10 +23,9 @@ Ship::Ship(TextureRepository* repo) {
objOptions.flipUVs = true;
objOptions.scale = 200.0F;
auto* data =
auto data =
loader.load(FileUtils::fromCwd("game/models/ship/ship.obj"), objOptions);
mesh = new StaticMesh(*data);
delete data;
mesh = new StaticMesh(data.get());
for (std::size_t i = 0; i < mesh->materials.size(); i++) {
mesh->materials[i]->ambient /= 2.0F;