diff tests/test_vulkan_wrapper.nim @ 587:713ac2886355

did: small name change
author Sam <sam@basx.dev>
date Tue, 11 Apr 2023 01:06:37 +0700
parents a136e3f43c2c
children 5871acc2977e
line wrap: on
line diff
--- a/tests/test_vulkan_wrapper.nim	Tue Apr 11 00:58:16 2023 +0700
+++ b/tests/test_vulkan_wrapper.nim	Tue Apr 11 01:06:37 2023 +0700
@@ -91,10 +91,10 @@
     indices=[[0'u16, 1'u16, 2'u16]],
     instanceCount=2
   )
-  setMeshData[Vec3f](mymesh1, "translate", @[newVec3f(0.3, 0.0)])
-  setMeshData[Vec3f](mymesh2, "translate", @[newVec3f(0.0, 0.3)])
-  setMeshData[Vec3f](mymesh3, "translate", @[newVec3f(-0.3, 0.0)])
-  setMeshData[Vec3f](mymesh4, "translate", @[newVec3f(0.0, -0.3), newVec3f(0.0, 0.5)])
+  mymesh1.setInstanceData("translate", @[newVec3f(0.3, 0.0)])
+  mymesh2.setInstanceData("translate", @[newVec3f(0.0, 0.3)])
+  mymesh3.setInstanceData("translate", @[newVec3f(-0.3, 0.0)])
+  mymesh4.setInstanceData("translate", @[newVec3f(0.0, -0.3), newVec3f(0.0, 0.5)])
   result = Scene(
     name: "main",
     root: newEntity("root", newEntity("triangle", mymesh4, mymesh3, mymesh2, mymesh1))
@@ -104,9 +104,9 @@
   var r = rect(color="ff0000")
   var t = tri(color="0000ff")
   var c = circle(color="00ff00")
-  setMeshData[Vec3f](r, "translate", @[newVec3f(0.5, -0.3)])
-  setMeshData[Vec3f](t, "translate", @[newVec3f(0.3,  0.3)])
-  setMeshData[Vec3f](c, "translate", @[newVec3f(-0.3,  0.1)])
+  setInstanceData[Vec3f](r, "translate", @[newVec3f(0.5, -0.3)])
+  setInstanceData[Vec3f](t, "translate", @[newVec3f(0.3,  0.3)])
+  setInstanceData[Vec3f](c, "translate", @[newVec3f(-0.3,  0.1)])
   result = Scene(
     name: "main",
     root: newEntity("root", t, r, c)