Mercurial > games > semicongine
comparison examples/E01_hello_triangle.nim @ 278:b17df28712d6
did: adjust for small API change
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 03 Jun 2023 13:44:17 +0700 |
parents | 95281f2db400 |
children | da0bd61abe91 |
comparison
equal
deleted
inserted
replaced
277:1fbef3a2d769 | 278:b17df28712d6 |
---|---|
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, @[], transformAttribute="") |
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() |