Mercurial > games > semicongine
diff examples/E03_hello_cube.nim @ 535:21c276c0a968
fix: stuff, add working pong
author | Sam <sam@basx.dev> |
---|---|
date | Mon, 06 Feb 2023 23:32:45 +0700 |
parents | eb92723db7b2 |
children | 0d8858aa0671 |
line wrap: on
line diff
--- a/examples/E03_hello_cube.nim Sun Feb 05 21:57:59 2023 +0700 +++ b/examples/E03_hello_cube.nim Mon Feb 06 23:32:45 2023 +0700 @@ -26,13 +26,11 @@ var pipeline: RenderPipeline[VertexDataA, Uniforms] uniforms: Uniforms - t: float32 -proc globalUpdate(engine: var Engine, dt: float32) = +proc globalUpdate(engine: var Engine, t, dt: float32) = let ratio = float32(engine.vulkan.frameSize.y) / float32( engine.vulkan.frameSize.x) - t += dt uniforms.model.value = translate3d(0'f32, 0'f32, 10'f32) * rotate3d(t, Yf32) # * rotate3d(float32(PI), Yf32)