Mercurial > games > semicongine
comparison tests/test_materials.nim @ 353:61c5d5fe9d93
add: multi-material for meshes
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 20 Sep 2023 22:35:04 +0700 |
parents | 00231e014642 |
children | f4f1474dc70a |
comparison
equal
deleted
inserted
replaced
352:00231e014642 | 353:61c5d5fe9d93 |
---|---|
19 "tex2": Texture(image: swiss, sampler: sampler), | 19 "tex2": Texture(image: swiss, sampler: sampler), |
20 }.toTable) | 20 }.toTable) |
21 | 21 |
22 proc main() = | 22 proc main() = |
23 var flag = rect() | 23 var flag = rect() |
24 flag.material = material | 24 flag.materials = @[material] |
25 var scene = Scene(name: "main", meshes: @[flag]) | 25 var scene = Scene(name: "main", meshes: @[flag]) |
26 scene.addShaderGlobalArray("test2", @[0'f32, 0'f32]) | 26 scene.addShaderGlobalArray("test2", @[0'f32, 0'f32]) |
27 | 27 |
28 var engine = initEngine("Test materials") | 28 var engine = initEngine("Test materials") |
29 | 29 |