Mercurial > games > semicongine
changeset 710:e1a789902e4f
fix: api change of texture
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 23 May 2023 16:29:01 +0700 |
parents | 3b00747b2451 |
children | a250ae05bbf7 |
files | tests/test_vulkan_wrapper.nim |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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