Mercurial > games > semicongine
comparison examples/E01_hello_triangle.nim @ 714:5f7ec8d1bd33
fix: API changes
author | sam <sam@basx.dev> |
---|---|
date | Wed, 24 May 2023 01:31:21 +0700 |
parents | d84b2e88776a |
children | dcc12ab20a91 |
comparison
equal
deleted
inserted
replaced
713:cdb3ff9b0047 | 714:5f7ec8d1bd33 |
---|---|
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() |