# HG changeset patch # User Sam # Date 1695225166 -25200 # Node ID b87dd3eaa9bd521369e7b4a97ed8a3e4fad50462 # Parent 61c5d5fe9d93eaeab24c1c67fc99c02f04d6e443 add: consider multiple materials when loading gltf diff -r 61c5d5fe9d93 -r b87dd3eaa9bd src/semicongine/resources/mesh.nim --- a/src/semicongine/resources/mesh.nim Wed Sep 20 22:35:04 2023 +0700 +++ b/src/semicongine/resources/mesh.nim Wed Sep 20 22:52:46 2023 +0700 @@ -227,9 +227,9 @@ # but or current mesh/rendering implementation is only designed for a single material # currently this is usually handled by adding the values as shader globals # TODO: this is bad - mesh[].materials = @[material] + mesh[].materials.add material else: - mesh[].materials = @[DEFAULT_MATERIAL] + mesh[].materials.add DEFAULT_MATERIAL if primitiveNode.hasKey("indices"): assert mesh[].indexType != None