comparison tests/test_vulkan_wrapper.nim @ 190:8f2eaf0d2808

add: uncomment some of the prepared texture code, nice interface for scene-global shader values (aka uniforms
author Sam <sam@basx.dev>
date Fri, 05 May 2023 23:57:56 +0700
parents df92519d4d68
children 81dc05b46b85
comparison
equal deleted inserted replaced
189:df92519d4d68 190:8f2eaf0d2808
155 for scene in scenes.mitems: 155 for scene in scenes.mitems:
156 for i in 0 ..< 1000: 156 for i in 0 ..< 1000:
157 if engine.updateInputs() != Running or engine.keyIsDown(Escape): 157 if engine.updateInputs() != Running or engine.keyIsDown(Escape):
158 engine.destroy() 158 engine.destroy()
159 return 159 return
160 var time = scene.getShaderGlobal("time") 160 setShaderGlobal(scene, "time", getShaderGlobal[float32](scene, "time") + 0.0005'f)
161 setValue[float32](time, get[float32](time) + 0.0005)
162 engine.renderScene(scene) 161 engine.renderScene(scene)
163 echo "Rendered ", engine.framesRendered, " frames" 162 echo "Rendered ", engine.framesRendered, " frames"
164 echo "Processed ", engine.eventsProcessed, " events" 163 echo "Processed ", engine.eventsProcessed, " events"
165 164
166 # cleanup 165 # cleanup