diff tests/test_materials.nim @ 1021:73b572f82a1f

add: bases for a better input-system
author sam <sam@basx.dev>
date Thu, 09 May 2024 23:02:35 +0700
parents a40bb0a48e07
children 74957cbf589b
line wrap: on
line diff
--- a/tests/test_materials.nim	Wed May 08 15:46:47 2024 +0700
+++ b/tests/test_materials.nim	Thu May 09 23:02:35 2024 +0700
@@ -41,6 +41,7 @@
 
   const
     shaderConfiguration1 = createShaderConfiguration(
+      name = "shader 1",
       inputs = [
         attr[Vec3f]("position", memoryPerformanceHint = PreferFastRead),
         attr[Vec2f]("uv", memoryPerformanceHint = PreferFastRead),
@@ -67,7 +68,7 @@
   })
   engine.loadScene(scene)
   var t = cpuTime()
-  while engine.updateInputs() == Running and not engine.keyIsDown(Escape):
+  while engine.updateInputs() and not keyIsDown(Escape):
     var d = float32(cpuTime() - t)
     setShaderGlobalArray(scene, "test2", @[newVec4f(d), newVec4f(d * 2)])
     engine.renderScene(scene)