diff examples/E02_squares.nim @ 145:a4e6e76128e6

add: upgrade all simple examples to new engine version
author Sam <sam@basx.dev>
date Wed, 26 Apr 2023 02:15:43 +0700
parents 34112bf5abf8
children ae8b0d89a2ee
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)