Mercurial > games > semicongine
comparison examples/E01_hello_triangle.nim @ 1065:86b9721dfc09
fix: again, I think, I have now a correct syncing of vertex buffers updates and drawing of multiple frames in flight XD
author | sam <sam@basx.dev> |
---|---|
date | Mon, 01 Apr 2024 22:42:50 +0700 |
parents | e1f92e3bec46 |
children | d27c8dbfef1c |
comparison
equal
deleted
inserted
replaced
1064:e1f92e3bec46 | 1065:86b9721dfc09 |
---|---|
24 material = VERTEX_COLORED_MATERIAL.initMaterialData() | 24 material = VERTEX_COLORED_MATERIAL.initMaterialData() |
25 )] | 25 )] |
26 ) | 26 ) |
27 myengine = initEngine("Hello triangle", showFps = true) | 27 myengine = initEngine("Hello triangle", showFps = true) |
28 | 28 |
29 myengine.initRenderer({VERTEX_COLORED_MATERIAL: shaderConfiguration}, vSync = false, inFlightFrames = 2) | 29 myengine.initRenderer({VERTEX_COLORED_MATERIAL: shaderConfiguration}, inFlightFrames = 1) |
30 myengine.loadScene(scene) | 30 myengine.loadScene(scene) |
31 | 31 |
32 while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape): | 32 while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape): |
33 transform[Vec3f](scene.meshes[0][], "position", scale(1.001, 1.001)) | 33 transform[Vec3f](scene.meshes[0][], "position", scale(1.001, 1.001)) |
34 myengine.renderScene(scene) | 34 myengine.renderScene(scene) |