Mercurial > games > semicongine
comparison examples/E01_hello_triangle.nim @ 739:5cd6808150fc
did: adjust for small API change
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 03 Jun 2023 13:44:17 +0700 |
parents | dcc12ab20a91 |
children | a4c757f5d17f |
comparison
equal
deleted
inserted
replaced
738:eb1a6ca20a84 | 739:5cd6808150fc |
---|---|
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() |