Mercurial > games > semicongine
diff tests/test_vulkan_wrapper.nim @ 814:6a09fe5dc99b
add: multi-material for meshes
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 20 Sep 2023 22:35:04 +0700 |
parents | 7a13941ba204 |
children | 51ee41c1d8ed |
line wrap: on
line diff
--- a/tests/test_vulkan_wrapper.nim Wed Sep 20 22:02:20 2023 +0700 +++ b/tests/test_vulkan_wrapper.nim Wed Sep 20 22:35:04 2023 +0700 @@ -124,9 +124,9 @@ var r = rect(color="ff0000") var t = tri(color="0000ff") var c = circle(color="00ff00") - r.material = mat - t.material = mat - c.material = mat + r.materials = @[mat] + t.materials = @[mat] + c.materials = @[mat] r.transform = translate(newVec3f(0.5, -0.3)) t.transform = translate(newVec3f(0.3, 0.3)) c.transform = translate(newVec3f(-0.3, 0.1)) @@ -147,8 +147,8 @@ var r1 = rect(color="ffffff") r2 = rect(color="000000") - r1.material = mat - r2.material = mat3 + r1.materials = @[mat] + r2.materials = @[mat3] r1.transform = translate(newVec3f(-0.5)) r2.transform = translate(newVec3f(+0.5)) result = @[r1, r2]