Mercurial > games > semicongine
comparison examples/E02_squares.nim @ 74:779607656b12
fix: stuff, add working pong
author | Sam <sam@basx.dev> |
---|---|
date | Mon, 06 Feb 2023 23:32:59 +0700 |
parents | bdef52f3bc0d |
children | fc5db4f1f94e |
comparison
equal
deleted
inserted
replaced
73:17c12b79faaa | 74:779607656b12 |
---|---|
15 | 15 |
16 var | 16 var |
17 pipeline: RenderPipeline[VertexDataA, Uniforms] | 17 pipeline: RenderPipeline[VertexDataA, Uniforms] |
18 uniformdata = Uniforms(t: Descriptor[float32](value: 0'f32)) | 18 uniformdata = Uniforms(t: Descriptor[float32](value: 0'f32)) |
19 | 19 |
20 proc globalUpdate(engine: var Engine, dt: float32) = | 20 proc globalUpdate(engine: var Engine, t, dt: float32) = |
21 uniformdata.t.value += dt | 21 uniformdata.t.value += dt |
22 engine.vulkan.device.updateUniformData(pipeline, uniformdata) | 22 engine.vulkan.device.updateUniformData(pipeline, uniformdata) |
23 | 23 |
24 when isMainModule: | 24 when isMainModule: |
25 randomize() | 25 randomize() |