Mercurial > games > semicongine
comparison examples/E01_hello_triangle.nim @ 145:a4e6e76128e6
add: upgrade all simple examples to new engine version
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 26 Apr 2023 02:15:43 +0700 |
parents | fc5db4f1f94e |
children | 25d97fa0ad5c |
comparison
equal
deleted
inserted
replaced
144:01881f9296fa | 145:a4e6e76128e6 |
---|---|
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() |