comparison tests/test_materials.nim @ 814:6a09fe5dc99b

add: multi-material for meshes
author Sam <sam@basx.dev>
date Wed, 20 Sep 2023 22:35:04 +0700
parents fb22fd8142b9
children f4f1474dc70a
comparison
equal deleted inserted replaced
813:fb22fd8142b9 814:6a09fe5dc99b
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