diff tests/test_vulkan_wrapper.nim @ 249:0ec43b857a7e

fix: api change of texture
author Sam <sam@basx.dev>
date Tue, 23 May 2023 16:29:01 +0700
parents 3cbbf50e9e4c
children ad078e26a1c7
line wrap: on
line diff
--- a/tests/test_vulkan_wrapper.nim	Tue May 23 16:24:15 2023 +0700
+++ b/tests/test_vulkan_wrapper.nim	Tue May 23 16:29:01 2023 +0700
@@ -118,16 +118,19 @@
     newScene("primitives", scene_primitives()),
     newScene("flag", scene_flag()),
   ]
+  var sampler = DefaultSampler()
+  sampler.magnification = VK_FILTER_NEAREST
+  sampler.minification = VK_FILTER_NEAREST
   for scene in scenes.mitems:
     scene.addShaderGlobal("time", 0.0'f32)
     let (R, W) = ([255'u8, 0'u8, 0'u8, 255'u8], [255'u8, 255'u8, 255'u8, 255'u8])
-    scene.addTexture("my_little_texture", Image(width: 5, height: 5, imagedata: @[
+    scene.addTexture("my_little_texture", Texture(image: Image(width: 5, height: 5, imagedata: @[
       R, R, R, R, R,
       R, R, W, R, R,
       R, W, W, W, R,
       R, R, W, R, R,
       R, R, R, R, R,
-    ]), VK_FILTER_NEAREST)
+    ]), sampler: sampler))
     engine.addScene(scene, vertexInput)
 
   # MAINLOOP