diff tests/test_materials.nim @ 407:ffc265916415

did: improve/refactor some of the material API
author Sam <sam@basx.dev>
date Wed, 03 Jan 2024 11:19:55 +0700
parents eaf084ba80e5
children 91e018270832
line wrap: on
line diff
--- a/tests/test_materials.nim	Mon Jan 01 21:41:40 2024 +0700
+++ b/tests/test_materials.nim	Wed Jan 03 11:19:55 2024 +0700
@@ -22,13 +22,13 @@
     }.toTable,
     attributes: {"tex1": TextureType, "tex2": TextureType}.toTable
   )
-  material = MaterialData(
-    theType: doubleTextureMaterial,
-    name: "swiss-thai",
-    attributes: {
+  material = initMaterialData(
+    theType=doubleTextureMaterial,
+    name="swiss-thai",
+    attributes={
       "tex1": initDataList(@[Texture(image: thai, sampler: sampler)]),
       "tex2": initDataList(@[Texture(image: swiss, sampler: sampler)]),
-    }.toTable
+    }
   )
 
 proc main() =