comparison 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
comparison
equal deleted inserted replaced
605:510c651cb27d 606:f41c1b78cf5b
36 renderPass = myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode) 36 renderPass = myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)
37 37
38 myengine.setRenderer(renderPass) 38 myengine.setRenderer(renderPass)
39 myengine.addScene(triangle, vertexInput) 39 myengine.addScene(triangle, vertexInput)
40 40
41 while myengine.running and not myengine.keyWasPressed(Escape): 41 while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):
42 myengine.updateInputs()
43 myengine.renderScene(triangle) 42 myengine.renderScene(triangle)
44 43
45 myengine.destroy() 44 myengine.destroy()