comparison examples/E10_pong.nim @ 714:5f7ec8d1bd33

fix: API changes
author sam <sam@basx.dev>
date Wed, 24 May 2023 01:31:21 +0700
parents 3b00747b2451
children 95281f2db400
comparison
equal deleted inserted replaced
713:cdb3ff9b0047 714:5f7ec8d1bd33
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])