comparison examples/E04_input.nim @ 708:3bb199dd45ba

fix: gltf loading
author Sam <sam@basx.dev>
date Tue, 23 May 2023 01:05:06 +0700
parents d84b2e88776a
children 5f7ec8d1bd33
comparison
equal deleted inserted replaced
707:3742bba2293f 708:3bb199dd45ba
177 177
178 # mainloop 178 # mainloop
179 while myengine.updateInputs() == Running: 179 while myengine.updateInputs() == Running:
180 if myengine.windowWasResized(): 180 if myengine.windowWasResized():
181 setShaderGlobal(scene, "projection", 181 setShaderGlobal(scene, "projection",
182 ortho[float32]( 182 ortho(
183 0'f32, float32(myengine.getWindow().size[0]), 183 0, float32(myengine.getWindow().size[0]),
184 0'f32, float32(myengine.getWindow().size[1]), 184 0, float32(myengine.getWindow().size[1]),
185 0'f32, 1'f32, 185 0, 1,
186 ) 186 )
187 ) 187 )
188 let 188 let
189 winsize = myengine.getWindow().size 189 winsize = myengine.getWindow().size
190 center = translate3d(float32(winsize[0]) / 2'f32, float32(winsize[1]) / 2'f32, 0.1'f32) 190 center = translate3d(float32(winsize[0]) / 2'f32, float32(winsize[1]) / 2'f32, 0.1'f32)