diff examples/E03_hello_cube.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 0d8858aa0671
children 3f13de7d8ec4
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,