comparison examples/E01_hello_triangle.nim @ 253:ad078e26a1c7

fix: API changes
author sam <sam@basx.dev>
date Wed, 24 May 2023 01:31:21 +0700
parents f3912838cd69
children 95281f2db400
comparison
equal deleted inserted replaced
252:f31d848ab551 253:ad078e26a1c7
34 )) 34 ))
35 myengine = initEngine("Hello triangle") 35 myengine = initEngine("Hello triangle")
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.updateInputs() == Running and not myengine.keyWasPressed(Escape): 41 while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):
42 myengine.renderScene(triangle) 42 myengine.renderScene(triangle)
43 43
44 myengine.destroy() 44 myengine.destroy()