Mercurial > games > semicongine
diff tests/test_materials.nim @ 714:5f7ec8d1bd33
fix: API changes
author | sam <sam@basx.dev> |
---|---|
date | Wed, 24 May 2023 01:31:21 +0700 |
parents | 37ef17c96bdb |
children | bfcb41211c5b |
line wrap: on
line diff
--- a/tests/test_materials.nim Wed May 24 01:31:02 2023 +0700 +++ b/tests/test_materials.nim Wed May 24 01:31:21 2023 +0700 @@ -14,8 +14,10 @@ WT, WT, WT, WT, WT, WT, WT, RT, RT, RT, RT, RT, RT, RT, ]) + let # image from file t2 = loadImage("flag.png") + var sampler = DefaultSampler() sampler.magnification = VK_FILTER_NEAREST sampler.minification = VK_FILTER_NEAREST @@ -23,6 +25,7 @@ scene.addShaderGlobalArray("test2", @[0'f32, 0'f32]) var engine = initEngine("Test materials") + const vertexInput = @[ attr[Vec3f]("position", memoryPerformanceHint=PreferFastRead), @@ -52,7 +55,7 @@ """ ) engine.setRenderer(engine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)) - engine.addScene(scene, vertexInput) + engine.addScene(scene, vertexInput, samplers) var t = cpuTime() while engine.updateInputs() == Running and not engine.keyIsDown(Escape): var d = float32(cpuTime() - t)