diff examples/E01_hello_triangle.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 fdae5f50fa00
children 3f13de7d8ec4
line wrap: on
line diff
--- a/examples/E01_hello_triangle.nim	Tue Apr 25 18:32:23 2023 +0700
+++ b/examples/E01_hello_triangle.nim	Wed Apr 26 02:15:43 2023 +0700
@@ -38,8 +38,7 @@
 myengine.setRenderer(renderPass)
 myengine.addScene(triangle, vertexInput)
 
-while myengine.running and not myengine.keyWasPressed(Escape):
-  myengine.updateInputs()
+while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):
   myengine.renderScene(triangle)
 
 myengine.destroy()