diff tests/test_materials.nim @ 1137:a4aa9f374d44

did: more renaming
author sam <sam@basx.dev>
date Tue, 04 Jun 2024 20:51:22 +0700
parents 71315636ba82
children 02e1d2658ff5
line wrap: on
line diff
--- a/tests/test_materials.nim	Tue Jun 04 16:51:50 2024 +0700
+++ b/tests/test_materials.nim	Tue Jun 04 20:51:22 2024 +0700
@@ -5,7 +5,7 @@
 
 let
   sampler = Sampler(magnification: VK_FILTER_NEAREST, minification: VK_FILTER_NEAREST)
-  (RT, WT, PT) = (toRGBA("A51931").asPixel, toRGBA("F4F5F8").asPixel, toRGBA("2D2A4A").asPixel)
+  (RT, WT, PT) = (ToRGBA("A51931").AsPixel, ToRGBA("F4F5F8").AsPixel, ToRGBA("2D2A4A").AsPixel)
   thai = Image[RGBAPixel](width: 7, height: 5, imagedata: @[
     RT, RT, RT, RT, RT, RT, RT,
     WT, WT, WT, WT, WT, WT, WT,
@@ -26,8 +26,8 @@
     theType = doubleTextureMaterial,
     name = "swiss-thai",
     attributes = {
-      "tex1": initDataList(@[Texture(colorImage: thai, sampler: sampler, isGrayscale: false)]),
-      "tex2": initDataList(@[Texture(colorImage: swiss, sampler: sampler, isGrayscale: false)]),
+      "tex1": InitDataList(@[Texture(colorImage: thai, sampler: sampler, isGrayscale: false)]),
+      "tex2": InitDataList(@[Texture(colorImage: swiss, sampler: sampler, isGrayscale: false)]),
     }
   )
 
@@ -43,18 +43,18 @@
     shaderConfiguration1 = createShaderConfiguration(
       name = "shader 1",
       inputs = [
-        attr[Vec3f]("position", memoryPerformanceHint = PreferFastRead),
-        attr[Vec2f]("uv", memoryPerformanceHint = PreferFastRead),
+        Attr[Vec3f]("position", memoryPerformanceHint = PreferFastRead),
+        Attr[Vec2f]("uv", memoryPerformanceHint = PreferFastRead),
       ],
       intermediates = [
-        attr[Vec2f]("uvout"),
+        Attr[Vec2f]("uvout"),
       ],
-      uniforms = [attr[Vec4f]("test2", arrayCount = 2)],
+      uniforms = [Attr[Vec4f]("test2", arrayCount = 2)],
       samplers = @[
-        attr[Texture]("tex1"),
-        attr[Texture]("tex2"),
+        Attr[Texture]("tex1"),
+        Attr[Texture]("tex2"),
       ],
-      outputs = [attr[Vec4f]("color")],
+      outputs = [Attr[Vec4f]("color")],
       vertexCode = """
       gl_Position = vec4(position.x, position.y + sin(Uniforms.test2[1].x) / Uniforms.test2[1].x * 0.5, position.z, 1.0);
       uvout = uv;""",