comparison examples/E04_input.nim @ 253:ad078e26a1c7

fix: API changes
author sam <sam@basx.dev>
date Wed, 24 May 2023 01:31:21 +0700
parents beb41c93aa3f
children 95281f2db400
comparison
equal deleted inserted replaced
252:f31d848ab551 253:ad078e26a1c7
170 main="color = outcolor;" 170 main="color = outcolor;"
171 ) 171 )
172 172
173 # set up rendering 173 # set up rendering
174 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode, clearColor=newVec4f(0, 0, 0.5))) 174 myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode, clearColor=newVec4f(0, 0, 0.5)))
175 myengine.addScene(scene, vertexInput, transformAttribute="transform") 175 myengine.addScene(scene, vertexInput, @[], transformAttribute="transform")
176 scene.addShaderGlobal("projection", Unit4f32) 176 scene.addShaderGlobal("projection", Unit4f32)
177 177
178 # mainloop 178 # mainloop
179 while myengine.updateInputs() == Running: 179 while myengine.updateInputs() == Running:
180 if myengine.windowWasResized(): 180 if myengine.windowWasResized():