comparison tests/test_vulkan_wrapper.nim @ 607:64eb53f81cf6

add: improvments and E10 (pong)
author Sam <sam@basx.dev>
date Thu, 27 Apr 2023 00:23:23 +0700
parents 5eadc1e1d6d8
children 061054515d28
comparison
equal deleted inserted replaced
606:f41c1b78cf5b 607:64eb53f81cf6
145 # MAINLOOP 145 # MAINLOOP
146 echo "Setup successfull, start rendering" 146 echo "Setup successfull, start rendering"
147 for i in 0 ..< 3: 147 for i in 0 ..< 3:
148 for scene in scenes: 148 for scene in scenes:
149 for i in 0 ..< 1000: 149 for i in 0 ..< 1000:
150 engine.updateInputs() 150 if engine.updateInputs() != Running or engine.keyIsDown(Escape):
151 setValue[float32](time.value, get[float32](time.value) + 0.0005)
152 if not engine.running or engine.keyIsDown(Escape):
153 engine.destroy() 151 engine.destroy()
154 return 152 return
153 setValue[float32](time.value, get[float32](time.value) + 0.0005)
155 engine.renderScene(scene) 154 engine.renderScene(scene)
156 echo "Rendered ", engine.framesRendered, " frames" 155 echo "Rendered ", engine.framesRendered, " frames"
157 echo "Processed ", engine.eventsProcessed, " events" 156 echo "Processed ", engine.eventsProcessed, " events"
158 157
159 # cleanup 158 # cleanup