Import materials from files

This commit is contained in:
Dane Johnson committed 2021-01-22 18:44:43 -06:00
1 parent 1ee5ed3e88
commit 1d97f6d855
22 files changed
+4427 -44

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
function couch.TexturedMesh(meshfile, ...)
local mesh = couch.Mesh.FromFile(meshfile)
for i, texturefile in ipairs({...}) do
local material = couch.Material()
local material = mesh:GetMaterial(i - 1)
material.usesTex = true
material.tex = couch.Texture.FromFile(texturefile)
mesh:SetMaterial(i - 1, material)