Mercurial > games > semicongine
comparison examples/E10_pong.nim @ 253:ad078e26a1c7
fix: API changes
author | sam <sam@basx.dev> |
---|---|
date | Wed, 24 May 2023 01:31:21 +0700 |
parents | 952428f04ffc |
children | 95281f2db400 |
comparison
equal
deleted
inserted
replaced
252:f31d848ab551 | 253:ad078e26a1c7 |
---|---|
54 main="color = outcolor;" | 54 main="color = outcolor;" |
55 ) | 55 ) |
56 | 56 |
57 # set up rendering | 57 # set up rendering |
58 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode, clearColor=backgroundColor)) | 58 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode, clearColor=backgroundColor)) |
59 myengine.addScene(level, vertexInput, transformAttribute="transform") | 59 myengine.addScene(level, vertexInput, @[], transformAttribute="transform") |
60 level.addShaderGlobal("projection", Unit4f32) | 60 level.addShaderGlobal("projection", Unit4f32) |
61 | 61 |
62 var | 62 var |
63 winsize = myengine.getWindow().size | 63 winsize = myengine.getWindow().size |
64 height = float32(winsize[1]) / float32(winsize[0]) | 64 height = float32(winsize[1]) / float32(winsize[0]) |