diff examples/E02_squares.nim @ 606:f41c1b78cf5b

add: upgrade all simple examples to new engine version
author Sam <sam@basx.dev>
date Wed, 26 Apr 2023 02:15:43 +0700
parents 177bfb85adb1
children 23e41f5adbaf
line wrap: on
line diff
--- a/examples/E02_squares.nim	Tue Apr 25 18:32:23 2023 +0700
+++ b/examples/E02_squares.nim	Wed Apr 26 02:15:43 2023 +0700
@@ -93,8 +93,7 @@
   myengine.addScene(scene, vertexInput)
   var time = initShaderGlobal("time", 0.0'f32)
   scene.components.add time
-  while myengine.running and not myengine.keyWasPressed(Escape):
-    myengine.updateInputs()
+  while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):
     setValue[float32](time.value, get[float32](time.value) + 0.0005)
     myengine.renderScene(scene)