diff examples/E03_hello_cube.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 8bb27869b649
children 25d97fa0ad5c
line wrap: on
line diff
--- a/examples/E03_hello_cube.nim	Tue Apr 25 18:32:23 2023 +0700
+++ b/examples/E03_hello_cube.nim	Wed Apr 26 02:15:43 2023 +0700
@@ -87,8 +87,7 @@
   myengine.addScene(cube, vertexInput)
 
   var t: float32 = cpuTime()
-  while myengine.running and not myengine.keyWasPressed(Escape):
-    myengine.updateInputs()
+  while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):
     setValue[Mat4](model.value, translate3d(0'f32, 0'f32, 10'f32) * rotate3d(t, Yf32))
     setValue[Mat4](
       projection.value,